CVE-2026-57062: GnuPG gpgsm CMS AES-GCM Authentication Tag Validation Bypass
GnuPG's gpgsm tool, which handles digitally signed and encrypted messages in a standard format called CMS (Cryptographic Message Syntax), has a flaw in how it validates a specific cryptographic parameter. When using AES-GCM encryption, the tool should reject messages where a security tag is shorter than 12 bytes, but instead it incorrectly accepts messages with a 4-byte tag. This laxness in validation could allow an attacker to forge or tamper with encrypted messages in ways that might not be detected, though the practical impact is limited and requires local access.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 2.9 LOW · CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
- Weaknesses (CWE)
- CWE-1284
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-23 / 2026-06-25
NVD description (verbatim)
CMS (Cryptographic Message Syntax) parsing in gpgsm in GnuPG through 2.5.20 mishandles the CMS format for AES-GCM because aes-ICVlen is supposed to be 12 bytes but 4 bytes is accepted. NOTE: this is related to CVE-2026-34182.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-57062 concerns a validation bypass in gpgsm's CMS parser when processing AES-GCM-encrypted messages. The authenticated encryption tag length (aes-ICVlen) is specified in RFC standards as 12 bytes for security, but the affected versions through 2.5.20 accept a 4-byte tag without validation. This reduces the effective authentication strength and could theoretically enable an attacker to craft or modify ciphertexts that pass integrity checks. The flaw is categorized under CWE-1284 (Improper Validation of Specified Quantity in Input), indicating the parser does not correctly enforce cryptographic parameter constraints. The issue is related to CVE-2026-34182, suggesting a broader pattern in CMS handling.
Business impact
The practical business risk is low because successful exploitation requires local access and the attacker must be able to intercept or substitute CMS-formatted messages in transit or at rest. Organizations relying on gpgsm for email encryption, document signing, or secure inter-system communication should evaluate whether they handle untrusted CMS messages from external sources. If gpgsm is used only for internal, trusted communications or as one layer in a defense-in-depth approach, the direct risk is minimal. However, any organization that depends on CMS integrity validation for compliance (e.g., HIPAA, PCI-DSS) should address this to maintain a strict security posture.
Affected systems
GnuPG versions through 2.5.20 are affected. The vulnerability is specific to the gpgsm component, which is the CMS/S.MIME handler within GnuPG. Systems using gpgsm to parse or verify CMS-formatted cryptographic messages are at risk. This includes Linux distributions, BSD systems, and other platforms where GnuPG is deployed. End-user systems running older versions of GnuPG, as well as server infrastructure using gpgsm for automated message processing, should be assessed.
Exploitability
Exploitation is constrained by three factors: (1) the attack vector is local (AV:L), meaning the attacker must have some level of access to the affected system; (2) the attack complexity is high (AC:H), requiring specific conditions or prerequisites; and (3) the integrity impact is limited (I:L), affecting only message integrity, not confidentiality or availability. The vulnerability is not listed on the CISA Known Exploited Vulnerabilities (KEV) catalog, indicating no known active exploitation in the wild as of the last update. The low CVSS score (2.9) reflects these constraints. An attacker would need to forge a malformed CMS message and have it processed by the vulnerable gpgsm, which might succeed only in specific configurations.
Remediation
The primary remediation is to upgrade GnuPG to a version beyond 2.5.20 that includes the fix for this validation issue. Verify the exact patched version by consulting the official GnuPG release notes and security advisories. In the interim, organizations can reduce exposure by: (1) restricting access to systems running gpgsm, minimizing the local attack surface; (2) implementing strict controls on which external CMS messages are processed; (3) layering additional integrity checks on top of CMS validation; and (4) monitoring for unexpected changes in signed or encrypted message handling.
Patch guidance
Check the GnuPG project website and your Linux distribution's security advisories for release information on versions after 2.5.20. Most major distributions (Debian, Ubuntu, Red Hat, etc.) will provide patched packages through their standard repositories. Verify that the specific patch addresses aes-ICVlen validation in CMS parsing. If you maintain GnuPG from source, build and test the latest stable release and perform regression testing on any automated systems that depend on CMS message verification before deploying to production.
Detection guidance
Detection of exploitation attempts is challenging because the flaw allows acceptance of invalid cryptographic parameters rather than crashing or raising errors. Log any unusual CMS message validation failures or rejections in gpgsm output. Monitor for CMS-formatted messages with unexpected structures, though this requires parsing and inspection at the application level. Consider enabling verbose logging in gpgsm (if supported by your version) to capture details of processed messages. Audit which external sources feed CMS messages into your systems and validate the authenticity of those sources independently.
Why prioritize this
Despite a low CVSS score, this vulnerability warrants attention in environments where CMS message integrity is a security boundary. The flaw is not actively exploited (not on KEV), but it represents a cryptographic validation bypass that could enable message tampering. Prioritize patching in systems that process CMS messages from untrusted or semi-trusted sources. For organizations using GnuPG only for internal, controlled communications, this can be addressed in a regular patching cycle rather than as an emergency.
Risk score, explained
The CVSS 3.1 score of 2.9 (LOW) reflects limited exploitability: local attack vector, high complexity, and low integrity impact with no effect on confidentiality or availability. The score appropriately penalizes a flaw that requires system access and specific conditions. However, the context matters—the underlying issue is a cryptographic validation bypass, which is conceptually serious. The low score reflects the practical constraints of the attack, not the severity of the underlying weakness. Organizations should not dismiss this purely on CVSS grounds if CMS integrity is critical to their threat model.
Frequently asked questions
Does this affect GnuPG versions I use for command-line signing and encryption?
Only if you specifically use the gpgsm component, which handles CMS/S.MIME messages. The main gpg and gpg2 tools for traditional OpenPGP operations are not affected by this flaw. Check your configuration and usage patterns; if you work only with OpenPGP format, you are not vulnerable.
Can this vulnerability lead to the decryption of my encrypted messages?
No. The flaw concerns the authentication tag length validation, not the encryption cipher itself. An attacker cannot decrypt AES-GCM messages. However, an attacker could theoretically forge or modify a message in a way that bypasses the integrity check, meaning you might use a tampered message without realizing it.
Is there active exploitation of this vulnerability?
No. The vulnerability is not listed on the CISA Known Exploited Vulnerabilities catalog as of the published date. There are no reports of in-the-wild exploitation. However, this does not mean you can ignore it indefinitely—patch when feasible according to your risk tolerance and update cycle.
What is CWE-1284 and why does it matter here?
CWE-1284 is 'Improper Validation of Specified Quantity in Input.' It indicates that the software fails to enforce the correct constraints on a security-critical parameter—in this case, the length of the authentication tag. This class of weakness is foundational to many authentication bypasses and should be taken seriously in cryptographic contexts.
This analysis is provided for informational purposes and should not be taken as a substitute for official vendor advisories or your organization's internal risk assessment. CVSS scores, affected versions, and patch information are based on publicly available data as of the publication date. Verify all patch versions, compatibility, and deployment guidance against official GnuPG releases and your distribution's security bulletins before applying updates. SEC.co makes no warranty regarding the completeness or timeliness of this information. Always consult with your security and engineering teams before making deployment decisions. Source: NVD (public-domain), retrieved 2026-07-29. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2026-47329LOWUbuntu Linux AppArmor Notification Validation Flaw
- CVE-2026-53540LOWPython-Multipart Content-Length Validation Bypass (Denial of Service)
- CVE-2026-11596MEDIUMScreenConnect Host Pass Token Expiration Bypass (MEDIUM, 4.7)
- CVE-2026-12059HIGHCelloOS SSH Command Bypass Vulnerability (CVSS 8.8)
- CVE-2026-49110HIGHUnauthenticated Broken Authentication in Upsell Order Bump Offer for WooCommerce ≤3.1.4
- CVE-2026-49218HIGHImageMagick DCM Decoder DoS Vulnerability – CVSS 7.5
- CVE-2026-52905MEDIUMLinux Kernel DAMON Invalid Region Size Denial of Service
- CVE-2026-53689HIGHlibnfs Integer Overflow in String Validation