Vulnerabilities in pkg:npm/counterpart
PACKAGECVE-2025-57354 is a MODERATE (CVSS 6.5) counterpart vulnerable to prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Counterpart libraries in the npm ecosystem. The issue involves counterpart vulnerable to prototype pollution. Remediation is available in the latest vendor maintenance releases.
pkg:npm/counterpart
Vulnerability advisories affecting package pkg:npm/counterpart. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-2488-w585-72ch | CVE-2025-57354 | MODERATE | counterpart vulnerable to prototype pollution |
CVE-2025-57354 at a Glance
Security Impact
CVSS: 6.5
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:N/A:L).
How to Fix CVE-2025-57354
To remediate this vulnerability, upgrade all affected Counterpart 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 counterpart@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls counterpart
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-57354, inspect your project dependencies using npm:
npm ls counterpart
Analyze the terminal output to locate any version of Counterpart 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 counterpart 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 Counterpart, 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-57354 Affected Counterpart Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
counterpart
|
npm |
≤ 0.18.6
|
|
References
Frequently Asked Questions
What is CVE-2025-57354?
Which Counterpart versions are affected?
What version fixes CVE-2025-57354?
Is counterpart affected?
What is the CVSS score of CVE-2025-57354?
What CWE is associated with CVE-2025-57354?
How can I check npm dependencies for CVE-2025-57354?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2488-w585-72ch",
"modified" : "2025-09-26T16:58:56Z",
"published" : "2025-09-24T18:30:32Z",
"aliases" : [ "CVE-2025-57354" ],
"summary" : "counterpart vulnerable to prototype pollution",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "counterpart"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.18.6"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-57354"
}, {
"type" : "WEB",
"url" : "https://github.com/martinandert/counterpart/issues/54"
}, {
"type" : "WEB",
"url" : "https://github.com/VulnSageAgent/PoCs/tree/main/JavaScript/prototype-pollution/CVE-2025-57354"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/martinandert/counterpart"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-26T16:58:56Z",
"nvd_published_at" : "2025-09-24T18:15:41Z"
}
}