Skip to content
Access control Advisory Advanced CVE-2026-17890

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

The HasKeyInMap function in Chromium's CRDTP library only recognises map keys encoded as STRING8, so a compromised renderer can encode a forbidden 'id' key as STRING16 to bypass the check in DevToolsSession::ValidateMessage. This lets the renderer spoof DevTools responses to external clients.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 45 days

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: A logic flaw in the HasKeyInMap function within the CRDTP library ignores map keys encoded as STRING16. This allows a compromised renderer process to bypass security checks in DevToolsSession::ValidateMessage by encoding forbidden fields (like 'id') as STRING16. Consequently, a compromised renderer can spoof DevTools responses to external clients.

Affected files:

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

Estimated timestamp from git blame: 2026-05-18

Summary

A vulnerability in the HasKeyInMap function within Chromium's CRDTP (Chrome DevTools Protocol) library allows for a bypass of security validations on CBOR-encoded messages. By encoding map keys using the STRING16 major type instead of the standard STRING8, a compromised renderer can evade checks performed by the browser process. This can be exploited to spoof DevTools responses, enabling cross-session attacks in environments using the CBOR binary protocol (e.g., automated testing with Puppeteer or WebDriver BiDi) or JSON clients where Chromium transcodes the CBOR payload.

Technical Details

The HasKeyInMap function in third_party/inspector_protocol/crdtp/cbor.cc is used by the browser to verify the structure of CBOR messages from the renderer without full deserialization. A critical use case is in DevToolsSession::ValidateMessage (in content/browser/devtools/devtools_session.cc), where it ensures that notification messages do not contain an id field. The presence of an id field would cause the message to be treated as a response by the recipient.

However, the implementation of HasKeyInMap incorrectly restricts its search for map keys to the STRING8 encoding:

C++
// third_party/inspector_protocol/crdtp/cbor.cc
if (is_key) {
  if (tokenizer.TokenTag() == CBORTokenTag::STRING8 &&
      SpanEquals(tokenizer.GetString8(), key)) {
    return true;
  }
}

The CRDTP tokenizer identifies both STRING8 (UTF-8) and STRING16 (UTF-16, via CBOR Major Type 2 BYTE_STRING) tokens. HasKeyInMap ignores STRING16 tokens while still advancing the tokenizer. This allows a compromised renderer to insert an id key encoded as STRING16. Because HasKeyInMap skips these tokens without error, it returns false (key not found) when searching for "id".

Potential Exploitation Steps

Note: These are suggested steps based on static analysis.

  1. An attacker compromises a renderer process that has an active DevTools session connected (e.g., from an automated testing framework).
  2. The attacker crafts a malicious DevTools protocol message payload intended to spoof a response. This requires an id field.
  3. The attacker encodes the payload in CBOR. Critically, instead of encoding the map key "id" as a standard UTF-8 string, the attacker encodes it as UTF-16 bytes using the CBOR byte string format (Major Type 2), which the CRDTP tokenizer parses as STRING16.
  4. The compromised renderer sends this message to the browser via the Mojo DispatchProtocolNotification method.
  5. In the browser, DevToolsSession::ValidateMessage checks for the presence of an id using HasKeyInMap(..., "id") to ensure the renderer isn't spoofing a response.
  6. Because the key is encoded as STRING16, the TokenTag() == CBORTokenTag::STRING8 check in HasKeyInMap fails. The function returns false, indicating no id was found, and the browser accepts the message.
  7. The browser forwards the message to the external DevTools client. If the client expects JSON, Chromium transcodes the CBOR, correctly decoding the STRING16 key into a standard JSON "id" string. If the client expects CBOR, standard parsers will also decode the STRING16 key correctly.
  8. The external client parses the message, identifies the id field, and treats the attacker's payload as a valid response to an earlier command.

Recommended Mitigation

HasKeyInMap should be updated to check for STRING16 keys. Since common protocol keys like "id" are ASCII, the check can compare the UTF-16 wire representation against the search key, or reject the message if a map key is encountered that is not STRING8 (as top-level CRDTP properties are expected to be ASCII/UTF-8).

Evaluated with Chrome root at commit: 65b3256311f3ab6fb9870eaa522de7e6dd2663bb


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 key-lookup helper only compares keys tagged as STRING8 and silently skips STRING16 keys, so a forbidden field encoded as STRING16 is not detected.

Impact

A compromised renderer could spoof DevTools responses to external clients, enabling cross-session attacks in environments using the CBOR binary protocol or JSON clients where Chromium transcodes the payload.

What the attacker needed

Compromised renderer process; active DevTools session; CBOR or transcoding JSON client

The fix

HasKeyInMap should be updated to check for STRING16 keys, or reject any map key that is not STRING8.

How it was found

  1. Compromise a renderer process that has an active DevTools session.
  2. Craft a DevTools protocol message that includes an 'id' field to spoof a response.
  3. Encode the message in CBOR with the 'id' key as a STRING16 byte string.
  4. Send the message to the browser via the Mojo DispatchProtocolNotification method.
  5. The browser's validation fails to find the 'id' key and accepts the message.
  6. The browser forwards the message to the external DevTools client, which treats it as a valid response.

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.

DevTools lets a browser page talk to a debugging client. The browser checks messages from the page to stop it pretending to be the client. The check only looked for one spelling of a field name, so a page could use another spelling and sneak a fake reply past the check.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.