ZeroHour

CVE-2025-47269

large

Unvalidated proxy destination in Coder code-server leaks session tokens (< 4.99.4)

CVSS 3.1
8.3 high
EPSS
43%p99
Published
()
Modified
AI analysis

code-server prior to version 4.99.4 fails to properly validate the port portion of URLs passed to its built-in /proxy subpath, allowing a crafted URL to proxy traffic to an arbitrary attacker-controlled domain (CWE-441, unspecified proxy-related issue). If a user running code-server with the built-in proxy enabled clicks a malicious link such as https://their-server/proxy/[email protected]/path, the connection is forwarded to the attacker's domain, with cookies included. The attacker can then capture the user's session token, log into the victim's code-server instance, and gain full access to the hosting machine as the user running code-server (CVSS 3.1: 8.3 high; network vector, requires user interaction, high confidentiality and integrity impact). All users self-hosting code-server versions before 4.99.4 with the built-in proxy enabled are affected. There is no confirmed in-the-wild exploitation, no public PoC, and it is not listed in CISA KEV, but the high EPSS score of 42.7% (99th percentile) indicates a substantial probability of exploitation within 30 days.

What to do: Upgrade code-server to version 4.99.4 or later. As interim mitigation, disable the built-in proxy feature or restrict network egress from code-server hosts, and avoid clicking links to /proxy paths on code-server instances from untrusted sources. Check code-server access logs for /proxy requests containing '@' in the path (arbitrary-host patterns) and invalidate/rotate session cookies if any are found.

Affected
Coder code-serverall versions prior to 4.99.4
Estimated exposure
large≈ tens of thousands of self-hosted deployments (order of 10^4–10^5 instances/users) — Based on code-server's large self-hosted install base — a widely used tool for running VS Code in the browser on cloud VMs and home servers, with tens of thousands of internet-exposed instances reported by public scans and millions of…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

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:// /proxy/[email protected]/path` would be proxied to `[email protected]/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
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L

In the news

No ingested article mentions this CVE yet.