Junglewise Threat Intelligence

CVE-2023-41037: OpenPGP.js cleartext signed message signature spoofing

CVE-2023-41037 · Severity: low · CVSS 3.1 · Published 2023-08-29

Executive brief

OpenPGP.js is a JavaScript library that encrypts and verifies digitally signed messages. An attacker can inject fake unsigned text into a cleartext signed message to make it appear legitimate when read directly, potentially deceiving users who visually inspect the message without checking the library's verified data field.

Technical details

OpenPGP.js versions up to 5.9.0 failed to validate cleartext signed messages correctly, ignoring any data preceding the "Hash: ..." header during signature verification. An attacker can prepend arbitrary unsigned text to a legitimate signed message; the library still reports the signature as verified but only actually signed the portion after the Hash header. Exploitation requires user interaction—specifically, a user or application trusting the visible message content rather than checking the verificationResult.data field. The vulnerability is mitigated if applications programmatically verify the actual signed data (verificationResult.data) or re-armor messages via armor(). Patched versions 5.10.1 (current) and 4.10.11 (legacy) now reject malformed cleartext messages.

Affected products

  • OpenPGP.js openpgp 4.10.10 and earlier, 5.0.0 to 5.10.0

Timeline

  • 2023-08-29: disclosed
  • 2023-08-29: patched: Patches released: v5.10.1 and v4.10.11

References