Junglewise Threat Intelligence

CVE-2025-25975: parse-git-config prototype pollution via expandKeys

CVE-2025-25975 · Severity: low · CVSS 3.1 · Published 2025-03-12

Vendors: npm.

Executive brief

parse-git-config is a Node.js library used to parse Git configuration files. A prototype pollution vulnerability in the expandKeys function allows an attacker to pollute the JavaScript object prototype chain, potentially modifying behavior across an application. If the polluted properties reach sensitive APIs (like code execution functions), this could lead to arbitrary command execution or other malicious actions.

Technical details

The vulnerability is a prototype pollution flaw (CWE-1321) in the expandKeys function of parse-git-config v3.0.0. An attacker supplies specially crafted configuration data with properties like '__proto__' or constructor-related keys that, when processed by expandKeys, pollute the global prototype chain. No authentication or user interaction is required—the vulnerability is triggered by passing a malicious config object to the expandKeys function. An attacker can inject arbitrary properties into Object.prototype, which propagates to all objects in the application. Depending on how downstream code uses polluted properties, this could escalate to remote code execution, information disclosure, or other injection attacks. Affected versions: 0 through 3.0.0.

Affected products

  • jonschlinkert parse-git-config 0 through 3.0.0

Timeline

  • 2025-01-26: disclosed: Vulnerability reported as GitHub issue #14
  • 2025-03-12: advisory: GHSA-8g77-54rh-46hx and CVE-2025-25975 published

References