Advisory

GHSA-2488-w585-72ch

Also known as: 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

Medium Basis: The source's own band: MODERATE

Dates

Published
2025-09-24 18:30 UTC
Modified
2025-09-26 17:27 UTC

Affected packages and fixes

counterpart

npm · All systems

Affected

  • introduced 0, last affected 0.18.6 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences