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.
Published: 2026-12-05
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Analysis and contextual insights are available on OpenCVE Cloud.

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 yet.

History

Sat, 05 Dec 2026 23:15:00 +0000

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.

cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-12-05T23:09:38.918Z

Reserved: 2026-11-21T15:44:17.881Z

Link: CVE-2026-134622

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-12-05T23:18:32.120

Modified: 2026-12-05T23:18:32.120

Link: CVE-2026-134622

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses