Overview
The CVE-2025-57349 vulnerability is a serious flaw in the messageformat package, an implementation of the Unicode MessageFormat 2 specification for JavaScript. This flaw can potentially lead to system compromise or data leakage, affecting all applications using versions of the package before 2.3.0. The vulnerability is of significant concern due to its potential for causing denial of service or other undefined behaviors in affected applications.
Vulnerability Summary
CVE ID: CVE-2025-57349
Severity: High (7.5 CVSS Score)
Attack Vector: Network
Privileges Required: None
User Interaction: None
Impact: Potential system compromise or data leakage
Affected Products
Product | Affected Versions
messageformat | < 2.3.0 How the Exploit Works
The vulnerability arises from the package’s improper handling of message key paths when processing nested message keys containing special characters such as __proto__. This can lead to unintended modification of the JavaScript Object prototype, a phenomenon known as prototype pollution. A remote attacker can take advantage of this flaw to inject properties into the global object prototype via specially crafted message input, creating potential for denial of service attacks or other undefined behaviors.
Conceptual Example Code
Below is a conceptual example demonstrating how the vulnerability might be exploited:
let malicious_payload = {
"__proto__.polluted": "Prototype polluted!"
};
messageformat.format(malicious_payload);
Following execution of the above code, all objects in the affected JavaScript context will have a “polluted” property with the value “Prototype polluted!”. This could be used to manipulate or disrupt the normal operation of the application.
