# CVE-2023-48711: Server-Side Request Forgery (SSRF) Vulnerability in google-translate-api-browser

> Attackers can exploit unsanitized input to force the library to make requests to internal network resources, potentially leading to data exposure or further exploitation.

- **Severity:** Low 3.7 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Nov 2023
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-4233-7q5q-m7p6

## What is CVE-2023-48711?

CVE-2023-48711 is a low-severity server-side request forgery vulnerability in cjvnjde google-translate-api-browser, published on 24 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

google-translate-api-browser is an npm package which interfaces with the google translate web api. 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. 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. An attacker can send requests within internal networks and the local host. Should any HTTPS application be present on the internal network with a vulnerability exploitable via a GET call, then it would be possible to exploit this using this vulnerability. This issue has been addressed in release version 4.1.3. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-918 (Server-Side Request Forgery)

## Which versions are affected by CVE-2023-48711?

2 open source packages ship an affected version, including google-translate-api-browser. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `google-translate-api-browser` | npm | All versions | 4.1.0 |
| `google-translate-api-browser` | npm | All versions | 4.1.0 |

Products: Cjvnjde Google Translate Api Browser.

## How do I fix CVE-2023-48711?

Upgrade google-translate-api-browser to 4.1.0 or later.

## Is CVE-2023-48711 being exploited?

There is no known exploitation of CVE-2023-48711 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-48711 and fix it if it is affected.

What it is: CVE-2023-48711 is a low-severity server-side request forgery vulnerability in cjvnjde google-translate-api-browser, published on 24 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-48711 in the wild and no public exploit code.

Affected packages and fixed versions:
- google-translate-api-browser (npm): affected all versions; fixed in 4.1.0
- google-translate-api-browser (npm): affected all versions; fixed in 4.1.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-48711/ (Markdown: https://insights.sbomify.com/CVE-2023-48711/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-48711
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-48711
- OSV: https://osv.dev/vulnerability/CVE-2023-48711

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-48711/
Summaries are generated and may contain mistakes; the official description above is the record.
