Insufficient data validation in DevTools (CVE-2026-14118)
The DevTools AI StylingAgent resolved BackendNodeId values supplied by the AI model without checking the origin of the resolved nodes, so an attacker could use prompt injection to scan and leak CSS data from cross-origin victim iframes that share a renderer process. A side-effect bypass in the AI engine's JavaScript stringification also allowed exfiltration of the retrieved data.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 46 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: The DevTools AI StylingAgent resolves BackendNodeId values from the AI model without origin checks, potentially allowing cross-origin data access. In environments where frames share a renderer process, an attacker can use prompt injection to scan and leak CSS data from victim iframes. This is further facilitated by a side-effect bypass in the AI engine's JavaScript stringification logic.
Affected files:
third_party/devtools-frontend/src/front_end/models/ai_assistance/agents/StylingAgent.tsthird_party/blink/renderer/core/inspector/inspector_dom_agent.ccthird_party/blink/renderer/core/inspector/inspected_frames.ccthird_party/blink/renderer/core/dom/dom_node_ids.cc
Estimated timestamp from git blame: 2025-10-01
Description
A potential vulnerability exists in the DevTools AI assistance StylingAgent where it resolves arbitrary BackendNodeId values provided by the AI model without verifying the origin of the resolved nodes.
Technical Details
- Predictable Node Identifiers:
BackendNodeIdvalues are assigned sequentially per renderer process inthird_party/blink/renderer/core/dom/dom_node_ids.cc. Since cross-origin frames often share a process on platforms like Android, or when using same-site cross-origin frames, these IDs are predictable. - Insufficient Origin Validation: In
third_party/devtools-frontend/src/front_end/models/ai_assistance/agents/StylingAgent.ts, the#getStylesmethod resolvesBackendNodeIdvalues usingnode.resolvePromise(). On systems where Site Isolation is not absolute, cross-origin iframes share aProbeSinkwith their parent, allowing theInspectorDOMAgentto successfully resolve these nodes for the DevTools frontend. TheStylingAgentdoes not check if the resolved node's origin matches the authorized origin for the AI conversation. - Exfiltration via Side-Effect Bypass: An attacker can exfiltrate retrieved data using a side-effect bypass in
third_party/devtools-frontend/src/front_end/models/ai_assistance/EvaluateAction.ts. While the initial evaluation of AI-generated JavaScript is checked for side effects, the subsequent serialization (stringification) of the result is performed via an internalcallFunctioncall that does not set thethrowOnSideEffectflag. This allows a side-effecting getter (e.g., one that callsfetch()) to execute during serialization without user approval.
Potential Exploitation Path
- An attacker website embeds a sensitive cross-origin victim site in an in-process iframe.
- The attacker uses prompt injection within a DOM attribute of an element they control.
- When a user selects this element and invokes AI assistance, the injection steers the AI to call
getStyleswith a range of UIDs to scan the process for the victim's nodes. - The agent retrieves styles from the victim iframe and returns them to the model.
- The model exfiltrates the data by returning an object with a side-effecting getter that sends the data to an attacker-controlled server during serialization.
Suggested Fix
- Implement a strict origin check in
StylingAgent.ts. For every node resolved from AI-supplied arguments (in#getStylesandaddElementAnnotation), verify that the node's origin matches theallowedOriginof the conversation context. - Ensure that all internal calls to
callFunctionduring the evaluation and serialization of AI-generated JavaScript (specifically inEvaluateAction.ts) respect thethrowOnSideEffectconstraint.
Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a
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.
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 StylingAgent did not verify that nodes resolved from AI-supplied BackendNodeId values belonged to the authorised origin, and the serialisation of AI-generated JavaScript results did not enforce the side-effect check.
Impact
An attacker could potentially read CSS data from a cross-origin victim iframe and exfiltrate it, but only where frames share a renderer process and Site Isolation is not absolute.
What the attacker needed
Victim uses DevTools AI assistance; cross-origin frames share a renderer process; attacker can inject prompt into DOM attribute; victim selects attacker-controlled element
The fix
The report suggests adding a strict origin check in StylingAgent for every AI-supplied node and ensuring internal callFunction calls during evaluation and serialisation respect the throwOnSideEffect constraint; the text does not say it was fixed.
How it was found
- An attacker website embeds a sensitive cross-origin victim site in an in-process iframe.
- The attacker places a prompt injection in a DOM attribute of an element they control.
- The user selects that element and invokes AI assistance, steering the AI to call getStyles with a range of UIDs.
- The agent retrieves styles from the victim iframe and returns them to the model.
- The model returns an object with a side-effecting getter that sends the data to an attacker-controlled server during serialisation.
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 has an AI helper that can look up styles for elements on a page. The helper trusted element identifiers given by the AI without checking which website the element belonged to, so a malicious page could trick the AI into reading styles from another site's frame. A second flaw let the AI's generated code send that stolen data out during a step that was supposed to be safe.
What is AI / LLM?
Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.