Low, CVSS 3.7npmAmendedPublished
google-translate-api-browser Server-Side Request Forgery (SSRF) Vulnerability
CVE-2023-48711 · GHSA-4233-7q5q-m7p6
- Affected
- npm google-translate-api-browser < 4.1.0
- Fixed in
- 4.1.0· Vendor fix available
- Issue
- A Server-Side Request Forgery (SSRF) Vulnerability is present in applications utilizing the google-translate-api-browser package and exposing the translateOptions to the end user. An attacker can set a malicious tld, causing the application to return unsafe URLs pointing towards local resources. Details The translateOptions.tld field is not properly sanitized before being placed in the Google translate URL. This can allow an attacker with control over the translateOptions to set the tld to a payload such as @127.0.0.1. This causes the full URL to become https://translate.google.@127.0.0.1/..., where translate.google. is the username used to connect to localhost. PoC Imagine a server running the following code (closely mimicking the code present in the package's README): An attacker can then send the following POST request to /translate: This will cause a request to be sent to the localhost of the server running the Node application. Impact An attacker can send requests within…
Recommended action: Upgrade to 4.1.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.