PT-2023-27753 · Unknown · Openpgp.Js

Larabr

·

Published

2023-08-29

·

Updated

2023-09-08

·

CVE-2023-41037

CVSS v3.1

4.3

Medium

VectorAV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Name of the Vulnerable Software and Affected Versions OpenPGP.js versions up to 5.9.0 OpenPGP.js version 5.10.1 (current stable version) is not affected, and version 4.10.11 (legacy version) is also not affected.
Description OpenPGP.js is a JavaScript implementation of the OpenPGP protocol. In affected versions, OpenPGP Cleartext Signed Messages are cryptographically signed messages where the signed text is readable without special tools. These messages typically contain a "Hash: ..." header declaring the hash algorithm used to compute the signature digest. OpenPGP.js up to v5.9.0 ignored any data preceding the "Hash: ..." texts when verifying the signature. As a result, malicious parties could add arbitrary text to a third-party Cleartext Signed Message, to lead the victim to believe that the arbitrary text was signed. A user or application is vulnerable to said attack vector if it verifies the CleartextMessage by only checking the returned verified property, discarding the associated data information, and instead visually trusting the contents of the original message. Since verificationResult.data would always contain the actual signed data, users and apps that check this information are not vulnerable.
Recommendations For OpenPGP.js versions up to 5.9.0, upgrade to version 5.10.1 (current stable version) or version 4.10.11 (legacy version) to resolve the issue. For users unable to upgrade, check the contents of verificationResult.data to see what data was actually signed, rather than visually trusting the contents of the armored message. As a temporary workaround, consider verifying the CleartextMessage by checking the verificationResult.data information, rather than only relying on the verified property.

Exploit

Fix

Improper Verification of Cryptographic Signature

Weakness Enumeration

Related Identifiers

CVE-2023-41037
GHSA-CH3C-V47X-4PGP

Affected Products

Openpgp.Js