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.
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.
Published:
2026-12-05
Score:
n/a
EPSS:
n/a
KEV:
No
Analysis and contextual insights are available on OpenCVE Cloud.
Remediation
Vendor Solution
Upgrade to Crypt-OpenPGP 1.22 or later.
Tracking
Sign in to view the affected projects.
Advisories
No advisories yet.
References
History
Sat, 05 Dec 2026 23:30:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | 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 | |
| Weaknesses | CWE-347 | |
| References |
|
|
Subscriptions
No data.
Status: PUBLISHED
Assigner: CPANSec
Published:
Updated: 2026-12-05T23:16:39.521Z
Reserved: 2026-11-22T03:20:38.863Z
Link: CVE-2026-134729
No data.
Status : Received
Published: 2026-12-06T00:17:24.633
Modified: 2026-12-06T00:17:24.633
Link: CVE-2026-134729
No data.
OpenCVE Enrichment
No data.
Weaknesses