CVE-2025-3197: Expand object Expand-object Vulnerable To Prototype Pollution Vulnerability
MODERATECVE-2025-3197 is a MODERATE (CVSS 7.3) expand-object vulnerable to prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Expand object libraries in the npm ecosystem. The issue involves expand-object vulnerable to prototype pollution via the expand() function. Remediation is available in the latest vendor maintenance releases.
CVE-2025-3197 at a Glance
Security Impact
CVSS: 7.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2025-3197
To remediate this vulnerability, upgrade all affected Expand object dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install expand-object@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls expand-object
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-3197, inspect your project dependencies using npm:
npm ls expand-object
Analyze the terminal output to locate any version of Expand object in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls expand-object command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Expand object, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-3197 Affected Expand object Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
expand-object
|
npm |
≤ 0.4.2
|
|
References
Frequently Asked Questions
What is CVE-2025-3197?
Which Expand object versions are affected?
What version fixes CVE-2025-3197?
Is expand-object affected?
What is the CVSS score of CVE-2025-3197?
What CWE is associated with CVE-2025-3197?
How can I check npm dependencies for CVE-2025-3197?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4vjr-hfpp-2m7w",
"modified" : "2025-04-04T18:24:05Z",
"published" : "2025-04-04T06:34:23Z",
"aliases" : [ "CVE-2025-3197" ],
"summary" : "expand-object Vulnerable to Prototype Pollution via the expand() Function",
"details" : "Versions of the package expand-object from 0.0.0 to 0.4.2 are vulnerable to Prototype Pollution in the expand() function in index.js. This function expands the given string into an object and allows a nested property to be set without checking the provided keys for sensitive properties like __proto__.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "expand-object"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.4.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-3197"
}, {
"type" : "WEB",
"url" : "https://gist.github.com/miguelafmonteiro/d8f66af61d14e06338b688f90c4dfa7c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jonschlinkert/expand-object"
}, {
"type" : "WEB",
"url" : "https://github.com/jonschlinkert/expand-object/blob/master/index.js#L13"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JS-EXPANDOBJECT-5821390"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-04-04T18:24:05Z",
"nvd_published_at" : "2025-04-04T05:15:46Z"
}
}