Overview
CVE-2025-57319 is a Prototype Pollution vulnerability found in the nestedRestore function of the fast-redact package version 3.5.0 and earlier. This vulnerability affects any systems or applications that utilize this package, potentially leading to system compromise or data leakage. Given the widespread use of the fast-redact package, the impact of this vulnerability can be extensive.
Vulnerability Summary
CVE ID: CVE-2025-57319
Severity: High (7.5 CVSS Score)
Attack Vector: Network
Privileges Required: Low
User Interaction: None
Impact: Can lead to system compromise or data leakage
Affected Products
Product | Affected Versions
fast-redact | 3.5.0 and earlier
How the Exploit Works
The Prototype Pollution vulnerability resides in the nestedRestore function of the fast-redact package. The exploit allows attackers to inject properties on Object.prototype by supplying a maliciously crafted payload. This can cause a denial of service (DoS) attack as the minimum consequence. Although the public API does not directly allow for this exploit, the internal utility functions can be manipulated to cause the pollution.
Conceptual Example Code
Here is a conceptual example of how an attacker might exploit this vulnerability:
POST /nestedRestoreFunction HTTP/1.1
Host: target.example.com
Content-Type: application/json
{
"__proto__": {
"admin": true
}
}
In this example, the attacker is adding an ‘admin’ property to the prototype of all objects, potentially escalating their privileges within the system.
Mitigation Guidance
The best mitigation at this time would be to apply the patch provided by the vendor. As a temporary mitigation, you could use a Web Application Firewall (WAF) or an Intrusion Detection System (IDS) to prevent exploitation of this vulnerability.
