Crypt::OpenPGP versions before 1.22 for Perl report a user ID as the signer without checking its self-certification, so a rewritten user ID names the signer of a genuine signature.
A key block's primary user ID is the first user ID packet in the block, whatever it says. A user ID is tied to the key by a certification signature the primary key makes over both, and nothing checks for one. verify returns the primary user ID as its result for a good signature, and sign, encrypt and decrypt attach it to the key as its owner.
An attacker who can change a keyring file or supply a key block for import can rewrite a key's user ID without touching key material, and a genuine signature by that key then verifies with the attacker's text returned as the signer.
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub