Improper Verification of Cryptographic Signature Affecting openpgp package, versions >=5.0.1 <5.11.3>=6.0.0-alpha.0 <6.1.1


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.03% (8th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-OPENPGP-10185678
  • published20 May 2025
  • disclosed19 May 2025
  • creditEdoardo Geraci, Thomas Rinsma

Introduced: 19 May 2025

NewCVE-2025-47934  (opens in a new tab)
CWE-347  (opens in a new tab)

How to fix?

Upgrade openpgp to version 5.11.3, 6.1.1 or higher.

Overview

openpgp is a JavaScript implementation of the OpenPGP protocol.

Affected versions of this package are vulnerable to Improper Verification of Cryptographic Signature through the openpgp.verify or openpgp.decrypt functions. An attacker can manipulate the message content to appear as legitimately signed by constructing a message with any data of their choice, using a valid signature from a different message.

Note:

This is only exploitable if the attacker has access to a valid signature and the plaintext data that was legitimately signed.

Workaround

This vulnerability can be mitigated by extracting the message and signatures from the message returned by openpgp.readMessage, and verifying each signature as a detached signature by passing the signature and a new message containing only the data (created using openpgp.createMessage) to openpgp.verify. For signed+encrypted messages, decrypt and verify the message in two steps, by first calling openpgp.decrypt without verificationKeys, and then passing the returned signature(s) and a new message containing the decrypted data (created using openpgp.createMessage) to openpgp.verify.

CVSS Base Scores

version 4.0
version 3.1