Crypt::OpenPGP versions before 1.22 for Perl let a key with a colliding short key ID stand in for the intended key in encrypt and verify
Summary
| CVE | CVE-2026-134622 |
|---|---|
| State | PUBLISHED |
| Assigner | CPANSec |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-12-05 23:18:32 UTC |
| Updated | 2026-12-05 23:18:32 UTC |
| Description | Crypt::OpenPGP versions before 1.22 for Perl let a key with a colliding short key ID stand in for the intended key in encrypt and verify. find_keyblock_by_keyid matches a key when the trailing bytes of its key ID equal the ID given, however short. key_by_id falls back to the last 4 bytes when the full 8-byte key ID has no match. The key server lookup cuts the key ID to its last 4 bytes before querying and takes the first key returned. No lookup compares a fingerprint. encrypt treats a Recipients entry of 8 hex digits as a 4-byte key ID and encrypts to every key in the keyring whose ID ends in those bytes. verify fetches the signer's key from the key server by its last 4 bytes when AutoKeyRetrieve is set and the keyring has no match. An attacker who places a key with a colliding 32-bit key ID in the keyring or on the key server in use gets a copy of each message encrypted to the short ID, and has signatures made with that key reported valid under a user ID of their choosing. |
Risk And Classification
Problem Types: CWE-187 | CWE-187 CWE-187 Partial String Comparison
There are no known software configurations currently associated with this CVE in NVD or the CVE Program record.
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/perl-Crypt-OpenPGP/Crypt-OpenPGP/commit/baa36d1f8fbc8ce537787... | 9b29abf9-4ab0-4765-b253-1875cd9b441e | github.com | |
| 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 | |
| metacpan.org/release/TIMLEGGE/Crypt-OpenPGP-1.21/source/lib/Crypt/OpenPGP/... | 9b29abf9-4ab0-4765-b253-1875cd9b441e | metacpan.org | |
| metacpan.org/release/TIMLEGGE/Crypt-OpenPGP-1.21/source/lib/Crypt/OpenPGP/... | 9b29abf9-4ab0-4765-b253-1875cd9b441e | metacpan.org | |
| metacpan.org/release/TIMLEGGE/Crypt-OpenPGP-1.21/source/lib/Crypt/OpenPGP/... | 9b29abf9-4ab0-4765-b253-1875cd9b441e | metacpan.org | |
| 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.
Workarounds
CNA: For deployments that cannot upgrade to 1.22, pass full key IDs of 16 hex digits to encrypt and find_keyblock_by_keyid, leave AutoKeyRetrieve unset, and compare the fingerprint of the certificate a lookup returns against a known value before using it.
There are currently no legacy QID mappings associated with this CVE.