CVE-2026-134729: 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

Published Dec 5, 2026
·
Updated

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.

Affected Software

1 affected component
cpan/crypt-openpgp<1.22

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Crypt::OpenPGP to a version that resolves this vulnerability.

    Fixed in 1.22

Event History

Dec 5, 2026
CVE Published
via MITRE·11:16 PM
Data Sourced
via MITRE·11:16 PM
RemedyDescriptionWeakness

Frequently Asked Questions

1

Which deployments are exposed?

Deployments using Crypt::OpenPGP for Perl versions before 1.22 are affected when they verify signed messages whose contents could be altered in transit or by an intermediary.

2

What does an attacker need to exploit this issue?

The attacker needs the ability to modify a signed message after it has been signed. They can add trailing whitespace to any line and have verification still report the signature as valid.

3

Are binary signatures affected?

A binary signature can be affected when text canonicalisation does not change the data and the literal data packet is marked as text. The packet mode determines whether verification treats the data as text, but that mode is not covered by the signature.

4

How can I tell whether a message may have been altered?

A message is suspect if trailing whitespace was added to one or more lines while Crypt::OpenPGP verification still succeeds. Versions before 1.22 may accept either the original hash or a hash with end-of-line whitespace removed.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203