Inappropriate implementation in DevTools (CVE-2026-13963)
A time-of-check time-of-use flaw in DevTools AI Assistance lets the origin lock be set from the page URL at the moment a tool runs, not when the chat starts. An attacker page can navigate to a victim origin while an AI query is in flight, so the AI collects and sends the victim's network and source data to the remote AI service.
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: A potential Time-of-Check Time-of-Use (TOCTOU) vulnerability in DevTools AI Assistance allows an attacker to bypass origin-locking. By navigating the inspected page while an AI query is in flight, the AI can be tricked into locking its security boundary onto a victim origin, leading to the unauthorized disclosure of the victim's network and source data to the remote AI service.
Affected files:
third_party/devtools-frontend/src/front_end/models/ai_assistance/AiConversation.tsthird_party/devtools-frontend/src/front_end/models/ai_assistance/agents/ContextSelectionAgent.tsthird_party/devtools-frontend/src/front_end/models/ai_assistance/agents/AiAgent.tsthird_party/devtools-frontend/src/front_end/models/ai_assistance/agents/NetworkAgent.tsthird_party/devtools-frontend/src/front_end/models/ai_assistance/agents/FileAgent.tsthird_party/devtools-frontend/src/front_end/panels/ai_assistance/AiAssistancePanel.tsthird_party/devtools-frontend/src/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts
Estimated timestamp from git blame: Unknown (Google3 checkout)
Summary
The DevTools AI Assistance feature employs an origin-locking mechanism intended to ensure that an AI conversation only accesses data from the origin where the chat was initiated. However, a potential Time-of-Check Time-of-Use (TOCTOU) flaw exists in how this origin is established. For conversations initiated without an explicit initial context (using the ContextSelectionAgent), the authorized origin is lazily initialized only when a tool is first invoked by the LLM, rather than at the moment the user submits their query.
Root Cause Analysis
The vulnerability resides in AiConversation.allowedOrigin() within third_party/devtools-frontend/src/front_end/models/ai_assistance/AiConversation.ts. In a context-free chat session, the #origin property is initially undefined. When the LLM (Aida) decides to call a tool (e.g., listNetworkRequests), it triggers the allowedOrigin() callback to determine the authorized scope.
// third_party/devtools-frontend/src/front_end/models/ai_assistance/AiConversation.ts
allowedOrigin = (): string|undefined => {
if (this.#origin) {
return this.#origin;
}
const target = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
const inspectedURL = target?.inspectedURL();
this.#origin = inspectedURL ? new Common.ParsedURL.ParsedURL(inspectedURL).securityOrigin() : undefined;
return this.#origin;
};
Because there is a significant asynchronous delay between the user submitting a query and the LLM responding with a tool call, a malicious page can initiate a navigation to a victim origin (e.g., https://victim.example) during this interval. When the tool handler eventually runs and calls allowedOrigin(), it retrieves the current inspectedURL(), which is now the victim's URL, and caches it as the conversation's permanent lock. This allows the AI to filter and collect data (network requests, response bodies, source files) from the victim origin.
Impact
An attacker can cause the AI Assistance feature to exfiltrate sensitive data from a cross-origin victim site to the remote Aida service. This data includes:
- Network Request Metadata: Full URLs and timing information.
- Response Bodies: Up to 10,000 characters of unredacted response content (JSON, HTML, etc.).
- Source Code: Filenames and contents of source files.
While the data is disclosed to the Aida endpoint and not directly to the attacker's web origin, this constitutes a bypass of the origin-lock security boundary designed to prevent unauthorized cross-origin data processing.
Potential Reproduction Steps
- Open DevTools on an attacker-controlled page (e.g.,
https://attacker.example). - Open the AI Assistance panel and ensure it has no selected element or request.
- Type a query such as "What are the network requests on this page?".
- Immediately after submitting, the attacker page executes a navigation (e.g.,
window.location.href = 'https://victim.example'). - The LLM processes the request and returns a call to
listNetworkRequests. - The
ContextSelectionAgentinvokesallowedOrigin(), which finds the victim's URL and locks the conversation tohttps://victim.example. - The AI successfully collects and transmits network request details from the victim origin.
Suggested Fix
Initialize the #origin in AiConversation immediately when the conversation is created or at the start of the run() method, using the origin of the primary page target at that specific moment. This ensures the lock is established before any asynchronous processing or potential navigation occurs.
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
The conversation's allowed origin is lazily initialised inside allowedOrigin() when a tool is first invoked, so it reads the current inspected URL after an asynchronous delay instead of the origin at query submission.
Impact
The AI Assistance feature could send a cross-origin victim site's network metadata, response bodies and source code to the remote Aida service, bypassing the origin lock, though the data goes to the AI endpoint rather than directly to the attacker's web origin.
What the attacker needed
DevTools AI Assistance enabled; attacker-controlled page open in DevTools; context-free AI chat session; victim origin reachable from the browser
The fix
The origin should be initialised when the conversation is created or at the start of run(), using the primary page target's origin at that moment.
How it was found
- Open DevTools on an attacker-controlled page.
- Open the AI Assistance panel with no selected element or request.
- Submit a query asking about the page's network requests.
- Immediately navigate the page to a victim origin.
- When the LLM calls a tool, allowedOrigin() reads the victim URL and locks the conversation to it.
- The AI collects and transmits network request details from the victim origin.
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 AI Assistance is meant to only look at data from the site where you started the chat. The check of which site is allowed happens late, after the AI has already started working. If the page changes to another site in that gap, the AI can end up reading and sending data from that other site.
What is AI / LLM?
Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.