CVE-2023-41037: Cleartext Signed Message Signature Spoofing in openpgp
Summary
CVE-2023-41037: Cleartext Signed Message Signature Spoofing in openpgp. Affects openpgp across 2 version ranges.
< 4.10.11
>= 5.0.0, < 5.10.1
Fixed in 4.10.11 or 5.10.1, depending on the release line you run. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
openpgp is an npm package that provides OpenPGP encryption and decryption functionality. It allows users to generate and manage OpenPGP keys, encrypt and decrypt messages, and sign and verify signatures. The package is widely used for secure communication and data protection. However, a vulnerability has been discovered in openpgp versions up to 5.9.0 that allows for Cleartext Signed Message Signature Spoofing.
Vulnerability Detail
The Cleartext Signed Message Signature Spoofing vulnerability in openpgp allows malicious parties to add arbitrary text to a third-party Cleartext Signed Message, making the victim believe that the arbitrary text was signed. This vulnerability arises from openpgp.js ignoring any data preceding the "Hash: ..." texts when verifying the signature. As a result, users or applications that only check the returned verified property and visually trust the contents of the original message are vulnerable. However, programmatically processing the CleartextMessage or retrieving the signed data using verificationResult.data mitigates the risk. The impact of this vulnerability is considered moderate with a CVSS score of 4.3.
How To Fix
Latest published version: 6.3.2 as of 23 Oct 2026
npm install openpgp@6.3.2
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
< 4.10.114.10.11npm install openpgp@4.10.11 -
>= 5.0.0, < 5.10.15.10.1npm install openpgp@5.10.1
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
A workaround for this vulnerability is to check the contents of verificationResult.data to see what data was actually signed, rather than visually trusting the contents of the armored message. This can be done by accessing the data property of the verification result object.
Conclusion
The Cleartext Signed Message Signature Spoofing vulnerability in openpgp versions up to 5.9.0 allows for the addition of arbitrary text to signed messages, potentially leading to deception or misinformation. To mitigate this vulnerability, users should update to the latest stable version (v5.10.1) or the legacy version (v4.10.11) and verify the contents of verificationResult.data. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for openpgp →
FAQ
The vulnerability allows malicious parties to add arbitrary text to a signed message, leading users to believe that the arbitrary text was signed. This can potentially result in users being misled or deceived by the content of the message.
No, only openpgp versions up to 5.9.0 are affected. The latest stable version (v5.10.1) includes a patch that addresses the vulnerability.
Yes, updating to the latest stable version of openpgp (v5.10.1) or the legacy version (v4.10.11) will fix the vulnerability. These versions reject messages that exploit the Cleartext Signed Message Signature Spoofing vulnerability.
Users should update their openpgp package to the latest stable version (v5.10.1) or the legacy version (v4.10.11). Additionally, users should verify the contents of verificationResult.data to ensure the integrity of the signed message.
There are no known instances of this vulnerability being exploited in the wild. However, it is still important to update to the fixed versions to prevent potential exploitation.
References
Related vulnerabilities
Recent vulnerabilities recorded for openpgp.