Medium, CVSS 5.3npmAmendedPublished
Cache Poisoning Vulnerability
CVE-2024-29042 · GHSA-882j-4vj5-7vmj
- Affected
- npm translate < 3.0.0
- Fixed in
- 3.0.0· Vendor fix available
- Issue
- An attacker controlling the second variable of the translate function is able to perform a cache poisoning attack. They can change the outcome of translation requests made by subsequent users. Details The opt.id parameter allows the overwriting of the cache key. If an attacker sets the id variable to the cache key that would be generated by another user, they can choose the response that user gets served. PoC Take the following simple server allowing users to supply text and the language to translate to. We can send the following request to poison the cache: Now, any user that attempts to translate "I love you" to Dutch, will get "I hate you" in Dutch as the response. Impact An attacker can control the results other users may get
Recommended action: Upgrade to 3.0.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.