CVE-2026-134725: Crypt::OpenPGP versions before 1.22 for Perl die on malformed messages in verify and decrypt instead of returning an error
Crypt::OpenPGP versions before 1.22 for Perl die on malformed messages in verify and decrypt instead of returning an error.
verify and decrypt, and handle which calls them, use packets from the message and from the decrypted content as the expected kind without checking what they are. A signature with no issuer subpacket, a one-pass signature packet with no signature after it, a message or decrypted content with no data packet where one is expected, a session key packet with an unsupported or mismatched algorithm, and a signature that names a key that cannot sign each make Perl die rather than return an error. These are reached before any cryptographic check, or with no more than the recipient's public key.
The documented contract is to return undef and set errstr, so a remote attacker who supplies such a message ends a process that calls verify, decrypt or handle without eval.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Crypt-OpenPGPto a version that resolves this vulnerability.Fixed in 1.22
Event History
Frequently Asked Questions
Which applications are exposed to remote termination?
Applications using Crypt::OpenPGP before 1.22 that process attacker-supplied OpenPGP messages through verify, decrypt, or handle are exposed if those calls are not protected by eval. A malformed message can terminate the Perl process rather than producing the documented undef result and errstr.
Does exploitation require a valid signature, private key, or successful cryptographic verification?
No. The affected paths can be reached before cryptographic checks, or with no more than the recipient's public key. Malformed packet layouts and certain unsupported, mismatched, or invalid key/signature conditions can trigger the failure.
What malformed inputs can trigger the failure?
Examples include signatures without an issuer subpacket, one-pass signature packets lacking a subsequent signature, messages or decrypted content missing an expected data packet, unsupported or mismatched session-key algorithms, and signatures naming a key that cannot sign.
What can be done if upgrading is not immediately possible?
Wrap calls to verify, decrypt, and handle in eval so that an exception from malformed input does not terminate the process. Treat exceptions as invalid-message failures and isolate processing of untrusted OpenPGP input where possible.