CVE-2026-134622

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

Published Dec 5, 2026 CVSS n/a EPSS n/a KEV · Not listed
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.

Remediation

Vendor Solution

Upgrade to Crypt-OpenPGP 1.22 or later.


Vendor Workaround

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.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
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.
Title 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
Weaknesses CWE-187
References

Subscriptions

No data.

Weaknesses

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Dec 5, 2026, 11:09 PM
Reserved
Nov 21, 2026, 3:44 PM
Status
Received
Published
Dec 5, 2026, 11:18 PM
Modified
Dec 5, 2026, 11:18 PM