Unauthenticated remote code execution through the bundled Node.js Brotli decoder (CVE-2026-111497)
Description
This advisory covers code-server's exposure to CVE-2026-111497, an out-of-bounds write in the Brotli decoder bundled with Node.js. The vulnerable code is part of Node.js, not code-server. code-server is affected for two reasons: its standalone releases and Docker images bundle a vulnerable Node.js version, and its request handling lets unauthenticated requests reach that decoder.
code-server registers express.json() and express.urlencoded() as global middleware in src/node/routes/index.ts, and express.json() in src/node/vscodeSocket.ts. With Express 5 and body-parser 2, these parsers decompress request bodies according to the Content-Encoding header, including Brotli (br). Any unauthenticated request with a JSON or form body and Content-Encoding: br, for example a POST to /login, is passed through the Node.js Brotli decoder before code-server checks whether the user is logged in. A crafted Brotli stream can corrupt decoder memory and may lead to code execution.
Standalone release archives and the codercom/code-server Docker images bundle their own Node.js runtime. In 4.141.0 and earlier, that runtime is affected (4.141.0 ships Node.js 24.21.0).
Note: Exploitation requires network access to code-server. code-server binds to
127.0.0.1:8080by default, so instances that are only reachable locally or through an authenticated tunnel are not exposed to remote attackers. Researchers have demonstrated code execution against an official Node.js build, though not reliably on every attempt. It has not been reproduced against code-server.
Impact
An unauthenticated attacker who can reach code-server over the network may be able to run code as the operating system user that runs code-server. That gives access to the user's files, terminals, credentials, and anything else the instance can reach. Where code execution does not succeed, the attacker can still crash the process.
Patches
Fixed in code-server 4.141.1, which makes two changes:
- Standalone releases and Docker images now bundle Node.js 24.22.1, which includes the upstream Brotli fix.
- The request body parsers now set
inflate: false, so code-server responds415 Unsupported Media Typeto any request with a compressed body (br,gzip, ordeflate) instead of decompressing it. This does not affect normal use: browsers and code-server's own clients never send compressed request bodies.
Installations from npm run on the system Node.js rather than a bundled runtime. Upgrading to 4.141.1 and later closes the unauthenticated request path described above, but the Brotli decoder in Node.js itself stays vulnerable to other inputs until Node.js is upgraded to 24.22.1 or later (22.23.4 or 26.12.1 on other release lines).
Workarounds
Configure a reverse proxy or WAF in front of code-server to reject requests whose Content-Encoding header contains br, compared case-insensitively. This includes multi-value headers such as gzip, br. For example, in nginx:
if ($http_content_encoding ~* "br") { return 415; }Alternatively, bind code-server to 127.0.0.1 and reach it only through SSH port forwarding or another authenticated tunnel until you can upgrade.