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

CVECVE-2026-134622
StatePUBLISHED
AssignerCPANSec
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-12-05 23:18:32 UTC
Updated2026-12-05 23:18:32 UTC
DescriptionCrypt::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

References

ReferenceSourceLinkTags
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

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.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report