CVE-2026-107442: Crypt::OpenPGP versions before 1.22 for Perl allow memory exhaustion via unbounded inflation of compressed data packets in decompress
Crypt::OpenPGP versions before 1.22 for Perl allow memory exhaustion via unbounded inflation of compressed data packets in decompress.
A compressed data packet is inflated in a single Compress::Zlib call with no limit on the output size, and the whole output is held in memory before any packet in it is parsed. Both handle and verify inflate a leading compressed packet before any signature is checked. After decryption, decrypt inflates one too, and with public-key encryption anyone holding the recipient's public key can produce a message that decrypts.
A remote attacker who supplies a message to handle, verify or decrypt can exhaust the process's memory with a small packet.
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 application paths are exposed to attacker-controlled compressed messages?
Any application that passes remotely supplied OpenPGP messages to Crypt::OpenPGP handle, verify, or decrypt is exposed. Handle and verify inflate a leading compressed packet before signature validation, while decrypt inflates compressed data after decryption.
Does an attacker need a valid signature or private key to trigger the memory exhaustion?
No valid signature is required for handle or verify because decompression occurs before signature checking. For public-key encrypted messages, anyone with the recipient's public key can create a message that reaches decompression during decrypt.
What is the practical impact of exploitation?
A small compressed packet can expand without an output-size limit, with the full inflated result retained in memory before parsing. This can exhaust the affected process's memory and cause denial of service.
What version resolves the issue?
Crypt::OpenPGP 1.22 addresses this issue. Versions before 1.22 are affected.