GitHub Advisoryadvisory · npm

GHSA-2488-w585-72ch counterpart vulnerable to prototype pollution

MEDIUM Published 2025-09-24 Modified 2025-09-26 Official page ↗
Aliases
CVE-2025-57354
Ecosystem
npm
Packages
counterpart
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
Weaknesses
CWE-1321
Reviewed
2025-09-26

Affected packages

• npm counterpart: <= 0.18.6 (no fix yet)

Description

A vulnerability exists in the `counterpart` library for Node.js and the browser due to insufficient sanitization of user-controlled input in translation key processing. The affected versions prior to 0.18.6 allow attackers to manipulate the library's translation functionality by supplying maliciously crafted keys containing prototype chain elements (e.g., __proto__ ), leading to prototype pollution. This weakness enables adversaries to inject arbitrary properties into the JavaScript Object prototype through the first parameter of the translate method when combined with specific separator configurations, potentially resulting in denial-of-service conditions or remote code execution in vulnerable applications. The issue arises from the library's failure to properly validate or neutralize special characters in translation key inputs before processing.

Related

Alias · CVE (1)

  • CVE-2025-57354 A vulnerability exists in the 'counterpart' library for Node.js and the browser due to insufficient sanitization of user-controlled input… vulnerability

Weakness · CWE (1)

  • CWE-1321 Improperly Controlled Modification of Object Prototype Attributes weakness

References