Vulnerabilities in pkg:npm/openpgp
PACKAGECVE-2025-47934 is a HIGH openpgp.js's message signature verification can vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Openpgp libraries in the npm ecosystem. The issue involves openpgp.js's message signature verification can be spoofed. Remediation is available by upgrading affected packages to version 5.11.3, 6.1.1.
pkg:npm/openpgp
Vulnerability advisories affecting package pkg:npm/openpgp. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-8qff-qr5q-5pr8 | CVE-2025-47934 | HIGH | OpenPGP.js's message signature verification can be spoofed |
| GHSA-ch3c-v47x-4pgp | CVE-2023-41037 | MODERATE | Cleartext Signed Message Signature Spoofing in openpgp |
| GHSA-qmvq-f3fj-m3wg | CVE-2015-8013 | HIGH | OpenPGP 1.2.0 and earlier decrypts arbitrary messages |
| GHSA-hfmf-q43v-2ffj | CVE-2019-9154 | HIGH | Improper Key Verification in openpgp |
| GHSA-qwqc-28w3-fww6 | CVE-2019-9153 | HIGH | Message Signature Bypass in openpgp |
| GHSA-77jf-fjjf-xcww | CVE-2019-9155 | MODERATE | Invalid Curve Attack in openpgp |
CVE-2025-47934 at a Glance
How to Fix CVE-2025-47934
To remediate this vulnerability, upgrade all affected Openpgp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install openpgp@5.11.3
npm install openpgp@6.1.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls openpgp
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-47934, inspect your project dependencies using npm:
npm ls openpgp
Analyze the terminal output to locate any version of Openpgp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.11.3), your application is affected.
Note: The npm ls openpgp command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In Openpgp, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-47934 Affected Openpgp Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
openpgp
|
npm |
≥ 5.0.1
< 5.11.3
|
5.11.3
|
|
openpgp
|
npm |
≥ 6.0.0-alpha.0
< 6.1.1
|
6.1.1
|
References
Frequently Asked Questions
What is CVE-2025-47934?
Which Openpgp versions are affected?
What version fixes CVE-2025-47934?
Is openpgp affected?
What CWE is associated with CVE-2025-47934?
How can I check npm dependencies for CVE-2025-47934?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8qff-qr5q-5pr8",
"modified" : "2025-05-19T21:54:43Z",
"published" : "2025-05-19T21:54:43Z",
"aliases" : [ "CVE-2025-47934" ],
"summary" : "OpenPGP.js's message signature verification can be spoofed",
"details" : "### Impact\nA maliciously modified message can be passed to either `openpgp.verify` or `openpgp.decrypt`, causing these functions to return a valid signature verification result while returning data that was not actually signed.\n\nThis flaw allows signature verifications of inline (non-detached) signed messages (using `openpgp.verify`) and signed-and-encrypted messages (using `openpgp.decrypt` with `verificationKeys`) to be spoofed, since both functions return extracted data that may not match the data that was originally signed. Detached signature verifications are not affected, as no signed data is returned in that case.\n\nIn order to spoof a message, the attacker needs a single valid message signature (inline or detached) as well as the plaintext data that was legitimately signed, and can then construct an inline-signed message or signed-and-encrypted message with any data of the attacker's choice, which will appear as legitimately signed by affected versions of OpenPGP.js.\n\nIn other words. any inline-signed message can be modified to return any other data (while still indicating that the signature was valid), and the same is true for signed+encrypted messages if the attacker can obtain a valid signature and encrypt a new message (of the attacker's choice) together with that signature.\n\nBoth OpenPGP.js v6 and v5 are affected. OpenPGP.js v4 is not affected.\n\n### Patches\nThe issue has been patched in versions 5.11.3 and 6.1.1.\n\n### Workarounds\n- When verifying inline-signed messages, extract the message and signature(s) from the message returned by `openpgp.readMessage`, and verify the(/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`.\n- When decrypting and verifying 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`.\n\n### Acknowledgements\nWe would like to thank:\n- Edoardo Geraci and Thomas Rinsma of [Codean Labs](https://codeanlabs.com/) for finding and reporting this vulnerability\n- The [Sovereign Tech Agency](https://www.sovereign.tech/) for sponsoring the [OpenPGP.js bug bounty program](https://yeswehack.com/programs/openpgp-js-bug-bounty-program)\n- [YesWeHack](https://www.yeswehack.com/) for hosting the [OpenPGP.js bug bounty program](https://yeswehack.com/programs/openpgp-js-bug-bounty-program)",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "openpgp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.1"
}, {
"fixed" : "5.11.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.11.2"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "openpgp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0-alpha.0"
}, {
"fixed" : "6.1.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 6.1.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/openpgpjs/openpgpjs/security/advisories/GHSA-8qff-qr5q-5pr8"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-47934"
}, {
"type" : "WEB",
"url" : "https://github.com/openpgpjs/openpgpjs/commit/43f5f4e2bd67d0514d06acc60b6ee571a049c229"
}, {
"type" : "WEB",
"url" : "https://github.com/openpgpjs/openpgpjs/commit/843a69d0adbdec0f87af09f9000a9223e6614e5c"
}, {
"type" : "WEB",
"url" : "https://github.com/openpgpjs/openpgpjs/commit/bd54e8535ca29b3bef58a8c02296892e408be356"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/openpgpjs/openpgpjs"
}, {
"type" : "WEB",
"url" : "https://github.com/openpgpjs/openpgpjs/releases/tag/v5.11.3"
}, {
"type" : "WEB",
"url" : "https://github.com/openpgpjs/openpgpjs/releases/tag/v6.1.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-347" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-05-19T21:54:43Z",
"nvd_published_at" : "2025-05-19T19:15:52Z"
}
}