CVE-2026-134728: Crypt::OpenPGP versions before 1.22 for Perl use a subkey without checking its binding signature, so a signature by a subkey added to a key block verifies as the key's owner
Crypt::OpenPGP versions before 1.22 for Perl use a subkey without checking its binding signature, so a signature by a subkey added to a key block verifies as the key's owner.
A key block takes every subkey packet that follows its primary key as one of its keys. A subkey is tied to the primary key by a binding signature the primary key makes over both, and nothing checks for one. keybyid, signingkey and encryptingkey return such a subkey, and findkeyblockbykeyid matches a key block through it.
An attacker who can change a keyring file or a key server's response can add a subkey of their own to another key block. A message signed with it then verifies as signed by that key's owner, and a message encrypted to the owner can go to the attacker's subkey when the primary key cannot encrypt.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.22
Event History
Frequently Asked Questions
What access does an attacker need to exploit this issue?
The attacker must be able to alter a keyring file or alter a response from a key server. They can then add an attacker-controlled subkey to another party's key block without possessing that party's primary key.
What application behaviors can be affected?
Affected versions may treat the injected subkey as belonging to the primary key owner when using key_by_id, signing_key, encrypting_key, or find_keyblock_by_keyid. This can cause attacker-created signatures to verify as the owner, or encryption intended for the owner to use the attacker's subkey when the primary key cannot encrypt.
What is the available remediation?
Upgrade Crypt::OpenPGP to version 1.22 or later. Versions before 1.22 are affected.