Skip to content
Smuggling / CRLF Advisory Advanced CVE-2026-17837

Insufficient validation of untrusted input in DevTools (CVE-2026-17837)

DevToolsSession::ValidateMessage only checks the first CBOR envelope and ignores trailing bytes, so a compromised renderer could append a second envelope that downstream automation clients parse as a separate root-session command. This could let the renderer bypass session boundaries and inject privileged Chrome DevTools Protocol commands.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 2 months

Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: DevToolsSession::ValidateMessage fails to ensure that a CBOR-serialized message has no trailing bytes after the first envelope. When running with a remote debugging pipe, a compromised renderer can potentially append extra CBOR envelopes to a benign message. Downstream automation clients will parse these trailing bytes as separate, highly-privileged root-session commands, potentially bypassing security boundaries.

Affected files:

  • content/browser/devtools/devtools_session.cc
  • third_party/inspector_protocol/crdtp/cbor.cc

Estimated timestamp from git blame: 2026-05-04

Overview

A potential session ID validation bypass exists in the Chromium DevTools session validation logic (DevToolsSession::ValidateMessage). A compromised renderer can potentially construct a multi-envelope CBOR payload to bypass the RFH_INCONSISTENT_DEVTOOLS_MESSAGE security check. This allows the renderer to inject arbitrary Chrome DevTools Protocol (CDP) commands into the root browser session or sibling sessions via the remote debugging pipe.

Root Cause Analysis

The validation of renderer-supplied messages is performed in DevToolsSession::ValidateMessage (located in content/browser/devtools/devtools_session.cc):

C++
bool DevToolsSession::ValidateMessage(const std::string& expected_session_id,
                                      const bool expected_has_id,
                                      base::span<const uint8_t> message) {
  std::vector<uint8_t> cbor_message;
  crdtp::span<uint8_t> span_message = crdtp::SpanFrom(message);

  if (!crdtp::cbor::IsCBORMessage(span_message)) {
    if (!crdtp::json::ConvertJSONToCBOR(span_message, &cbor_message).ok()) {
      return false;
    }
    span_message = crdtp::SpanFrom(cbor_message);
  }

  crdtp::span<uint8_t> extracted_session_id =
      crdtp::cbor::GetString8ValueFromMap(span_message,
                                          crdtp::SpanFrom("sessionId"));
  ...
}

If the input buffer is recognized as a CBOR message by IsCBORMessage (which only checks the first few bytes of the envelope header), the browser extracts the sessionId using crdtp::cbor::GetString8ValueFromMap on the raw span_message buffer.

However, GetString8ValueFromMap and HasKeyInMap only parse the first outer map inside the first envelope. They return as soon as they process the map's trailing STOP token and never verify if there are trailing bytes remaining in span_message (i.e., whether the entire buffer was consumed).

When a message successfully validates, the entire original contiguous buffer (including any unvalidated trailing bytes) is forwarded verbatim to the client in DevToolsSession::DispatchProtocolResponseOrNotification:

C++
client->DispatchProtocolMessage(agent_host, message->data);

Potential Attack Mechanism

If Chrome is run with --remote-debugging-pipe=cbor, the bytes flow through PipeWriterCBOR::WriteIntoPipe which writes the entire buffer verbatim into the pipe without modification:

C++
void WriteIntoPipe(std::string message) override {
  DCHECK(crdtp::cbor::IsCBORMessage(crdtp::SpanFrom(message)));
  WriteBytes(message.data(), message.size());
}

External automation clients (e.g., Puppeteer, Playwright) read sequentially from the pipe. They determine the boundaries of each incoming CBOR frame by parsing the outer_size() declared in each envelope's header. If the browser writes a buffer containing two back-to-back envelopes, the external client reads and parses them as two separate, subsequent root-session CDP frames.

By appending a second, smuggled envelope with no sessionId (directing it to the root session) after a benign envelope that carries a valid matching sessionId, a compromised renderer can potentially bypass session boundaries and execute arbitrary commands in the root session.

Note: These steps are based on a source-level code analysis. Our tooling does not currently have the capability to run a live POC to confirm the exploit.

Suggested Fix

Ensure that the incoming CBOR message consists of exactly one envelope and contains no trailing bytes. This can be achieved by utilizing crdtp::Dispatchable or parsing the message structure fully using a validator that enforces that the entire buffer is consumed (reporting CBOR_TRAILING_JUNK if there are leftover bytes past the parsed envelope length).

Evaluated with Chrome root at commit: fb72408a8493c46bc75fae1c70d03daec96b3040


Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:

  • If you are familiar with the severity guidelines, you may adjust the severity.
  • If this is a false positive, and there's no work to be done, please close as WAI.
  • If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.

Data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the CBOR validation helper only parses the first outer map and returns without checking that the whole input buffer was consumed, so trailing bytes are forwarded unvalidated.

Impact

A compromised renderer could potentially inject arbitrary CDP commands into the root browser session or sibling sessions, but only when Chrome runs with the remote debugging pipe in CBOR mode and an external automation client is reading it; the report is based on code analysis and no live proof of concept was run.

What the attacker needed

Chrome started with --remote-debugging-pipe=cbor; A compromised renderer process; An external automation client reading the pipe

The fix

The message should be validated so that exactly one envelope is present and the entire buffer is consumed, rejecting any trailing bytes.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Chrome's DevTools protocol lets tools like Puppeteer control the browser. Messages are packed in a format called CBOR, and the browser only checked the first message in a buffer, ignoring anything after it. A malicious web page that had already broken out of its sandbox could sneak a second, more powerful command into the same buffer, and the external tool would run it as if it came from the browser itself.

What is Smuggling / CRLF?

A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Request smuggling and header injection

The lesson behind this report.

A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.