Crypt::OpenPGP versions before 1.22 for Perl accept a signature over text to which trailing whitespace has been added, as verify tries the hash with and without it
Summary
| CVE | CVE-2026-134729 |
|---|---|
| State | PUBLISHED |
| Assigner | CPANSec |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-12-06 00:17:24 UTC |
| Updated | 2026-12-06 00:17:24 UTC |
| Description | Crypt::OpenPGP versions before 1.22 for Perl accept a signature over text to which trailing whitespace has been added, as verify tries the hash with and without it. For a text signature, verify hashes the data twice, with and without whitespace at the end of each line removed, and accepts the signature if either hash matches. Whether the data is hashed as text follows the mode of the literal data packet, which the signature does not cover, rather than the signature type. A binary signature over data that text canonicalisation leaves unchanged therefore accepts the same addition once the packet is marked as text. An attacker who can alter a signed message can add whitespace at the end of any line, and verify still reports the signature valid. |
Risk And Classification
Problem Types: CWE-347 | CWE-347 CWE-347 Improper Verification of Cryptographic Signature
There are no known software configurations currently associated with this CVE in NVD or the CVE Program record.
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| metacpan.org/release/TIMLEGGE/Crypt-OpenPGP-1.21/source/lib/Crypt/OpenPGP.pm | 9b29abf9-4ab0-4765-b253-1875cd9b441e | metacpan.org | |
| metacpan.org/release/TIMLEGGE/Crypt-OpenPGP-1.22/changes | 9b29abf9-4ab0-4765-b253-1875cd9b441e | metacpan.org | |
| www.rfc-editor.org/rfc/rfc4880 | 9b29abf9-4ab0-4765-b253-1875cd9b441e | www.rfc-editor.org | |
| github.com/perl-Crypt-OpenPGP/Crypt-OpenPGP/commit/d7ba121dc26101b7786e0... | 9b29abf9-4ab0-4765-b253-1875cd9b441e | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
Additional Advisory Data
Solutions
CNA: Upgrade to Crypt-OpenPGP 1.22 or later.
There are currently no legacy QID mappings associated with this CVE.