Vulnerabilities in pkg:npm/expand-object

PACKAGE
Advisory Identifier: GHSA-4vjr-hfpp-2m7w
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/expand-object

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/expand-object. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-4vjr-hfpp-2m7w CVE-2025-3197 MODERATE expand-object Vulnerable to Prototype Pollution via the expand() Function

CVE-2025-3197 at a Glance

CVE Identifier CVE-2025-3197
GHSA Identifier GHSA-4vjr-hfpp-2m7w
Severity MODERATE
CVSS v3.1 Base Score 7.3
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Expand object
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (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.

expand-object fixed: Latest secure release
npm install expand-object@Latest secure release
Verify Direct and Transitive Dependencies

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

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__.

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?
CVE-2025-3197 is a security vulnerability in Expand object involving expand-object Vulnerable to Prototype Pollution via the expand() Function under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Expand object versions are affected?
Affected versions include releases prior to current release patches across affected packages: expand-object.
What version fixes CVE-2025-3197?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is expand-object affected?
Yes, expand-object is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2025-3197?
CVE-2025-3197 has a CVSS v3.1 base score of 7.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2025-3197?
CVE-2025-3197 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (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.).
How can I check npm dependencies for CVE-2025-3197?
Run the dependency tree command: 'npm ls expand-object'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}