Overview
The spmrc package, known for providing the rc manager for spm, has a notable Prototype Pollution vulnerability in its version 1.2.0 and before. This vulnerability, classified as CVE-2025-57327, potentially allows attackers to inject properties on Object.prototype via a crafted payload. This results in a Denial of Service (DoS) at the very least, and could pose a significant risk to systems utilizing the affected spmrc package.
Vulnerability Summary
CVE ID: CVE-2025-57327
Severity: High (CVSS: 7.5)
Attack Vector: Network
Privileges Required: None
User Interaction: None
Impact: Denial of Service (DoS), Potential system compromise or data leakage
Affected Products
Product | Affected Versions
spmrc | 1.2.0 and before
How the Exploit Works
The Prototype Pollution vulnerability in spmrc allows attackers to modify the prototype of Object. When an attacker supplies a malicious payload, they can inject properties into Object.prototype. As a result, the attacker can cause unexpected behavior in the application, leading to Denial of Service (DoS). Depending on the application and its usage of the polluted objects, the impact could potentially escalate to system compromise or data leakage.
Conceptual Example Code
Here is a conceptual example of how the vulnerability might be exploited via a crafted payload:
var spmrc = require('spmrc');
spmrc.set('__proto__.polluted', 'Prototype Polluted');
console.log(polluted); // Output: Prototype Polluted
In this example, the attacker injects a property, ‘polluted’, on the Object prototype by using the set function. As a result, all objects inherit this property, causing unexpected behavior in the application.