CVE-2025-57354: Counterpart Counterpart Vulnerable To Prototype Pollution Vulnerability

MODERATE
Advisory Identifier: GHSA-2488-w585-72ch
CVSS 6.5
CWE-1321
Published
Advisory Summary

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

CVE-2025-57354 at a Glance

CVE Identifier CVE-2025-57354
GHSA Identifier GHSA-2488-w585-72ch
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Counterpart
Package Ecosystem npm
Published Date
Last Updated

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

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 None (I:N)
Availability Low (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.

counterpart fixed: Latest secure release
npm install counterpart@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 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

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.

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?
CVE-2025-57354 is a security vulnerability in Counterpart involving counterpart vulnerable to prototype pollution under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Counterpart versions are affected?
Affected versions include releases prior to current release patches across affected packages: counterpart.
What version fixes CVE-2025-57354?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is counterpart affected?
Yes, counterpart 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-57354?
CVE-2025-57354 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L.
What CWE is associated with CVE-2025-57354?
CVE-2025-57354 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-57354?
Run the dependency tree command: 'npm ls counterpart'. 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-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"
  }
}