Insufficient control flow management in DevTools (CVE-2026-79033)
The V8 inspector's preview generation for Map and Set entries can walk the prototype chain of entry values with ownProperties set to false, so a Proxy prototype can run page-controlled traps synchronously inside the inspector. If validated, this re-entrancy could let an attacker mutate inspector state and potentially cause memory corruption in the renderer.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 48 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 V8 inspector's nested preview generation for Map and Set entries can traverse the prototype chain of entry values with ownProperties=false. If an entry value inherits from a Proxy prototype, this prototype walk can synchronously trigger page-controlled proxy traps inside the inspector context. This potential re-entrancy primitive could allow an attacker to run page JavaScript during preview generation and potentially cause memory corruption.
Affected files:
v8/src/inspector/value-mirror.ccv8/src/debug/debug-property-iterator.cc
Estimated timestamp from git blame: 2018-10-31
Description
During V8 Inspector preview generation, ObjectMirror::buildObjectPreviewInternal handles Map/Set/WeakMap/WeakSet entries by looping through them and initiating nested preview generation for each entry's key and value:
// v8/src/inspector/value-mirror.cc
for (const auto& entry : entries) {
std::unique_ptr<ObjectPreview> valuePreview;
entry.value->buildEntryPreview(context, nameLimit, indexLimit, &valuePreview);
buildEntryPreview re-enters buildObjectPreviewInternal with forEntry=true:
void buildEntryPreview(...) const override {
buildObjectPreviewInternal(context, true /* forEntry */,
false /* generatePreviewForTable */, nameLimit,
indexLimit, result);
}
During this nested call, the inspector retrieves the properties of the entry value for the preview, invoking getPropertiesForPreview which delegates to ValueMirror::getProperties with ownProperties set to false:
return ValueMirror::getProperties(context, object, false, false, false, &accumulator);
Because ownProperties is false, the property iterator (v8::debug::PropertyIterator) is permitted to traverse beyond the object's own properties onto its prototype chain. If the prototype of the entry value is a JSProxy, the iterator lands on the proxy. When fetching keys (KeyAccumulator::GetKeys) or querying property attributes/descriptors, the inspector synchronously invokes the proxy's ownKeys and getOwnPropertyDescriptor traps, leading to page-controlled JS execution.
Potential Call Flow and Execution Path
Based on static code analysis, the following sequence represents the potential execution path:
- The page registers a custom Proxy
evilProtowith traps forownKeysandgetOwnPropertyDescriptorand sets it as the prototype of an objectentryVal(Object.setPrototypeOf(entryVal, evilProto)). - The page logs a Map containing
entryValto the console (e.g.,console.log(new Map([['key', entryVal]]))). - In response, V8 inspector routes the log to
V8ConsoleMessageStorage::addMessageand eventually toV8ConsoleMessage::reportToFrontendwithgeneratePreview=true. V8InspectorSessionImpl::wrapObjectinvokesInjectedScript::wrapObjectwithWrapMode::kPreview.ObjectMirror::buildRemoteObjectcallsbuildObjectPreviewto recursively generate the preview for the Map.buildObjectPreviewInternalloops through the Map's entry values and callsentry.value->buildEntryPreview.- A nested call to
buildObjectPreviewInternalonentryValtriggersgetPropertiesForPreviewwithownProperties=false. v8::debug::PropertyIteratortraverses ontoevilProto.KeyAccumulator::GetKeysandJSReceiver::GetOwnPropertyDescriptordispatch to the proxy, running the page's customownKeysandgetOwnPropertyDescriptortraps synchronously.
Note: These are potential execution steps derived from static code analysis; our tooling does not currently have the capability to run code or compile a live proof-of-concept.
Potential Security Impact
If validated, synchronous page JavaScript execution in the middle of inspector preview generation constitutes a re-entrancy vulnerability. An attacker could potentially leverage this synchronous execution window to mutate V8/Inspector internal state, detach frames/contexts, or free underlying structures while they are still being traversed on the call stack, potentially leading to Use-After-Free (UAF) or other memory safety issues inside the sandboxed renderer process.
Suggested Remediation
When generating nested previews for Map/Set entry keys and values (where forEntry is true), the inspector should avoid traversing onto JSProxy prototypes, or restrict property retrieval to own properties only (i.e., setting ownProperties to true). Specifically, in getPropertiesForPreview or buildObjectPreviewInternal, verify whether the target is being evaluated as an entry value, and avoid non-own property collection on objects with prototype chains containing proxies.
Evaluated with Chrome root at commit: 84065d9121f6e48f67755f0ae963cc09617e5c85
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, nested preview generation for Map/Set entry values retrieves properties with ownProperties set to false, so the property iterator can reach a Proxy on the prototype chain and synchronously run its traps inside the inspector.
Impact
If validated, an attacker could potentially use the synchronous execution window to mutate inspector state or free structures still on the call stack, potentially leading to a use-after-free or other memory safety issue inside the sandboxed renderer process.
What the attacker needed
Victim opens DevTools with console; page runs attacker-controlled JavaScript; page logs a Map or Set with a Proxy prototype
The fix
The inspector should avoid traversing onto Proxy prototypes for entry values, or restrict property retrieval to own properties only.
How it was found
- The page creates a Proxy with ownKeys and getOwnPropertyDescriptor traps and sets it as the prototype of an entry value.
- The page logs a Map containing that entry value to the console.
- The inspector generates a preview for the Map and calls buildEntryPreview on the entry value.
- The nested preview retrieves properties with ownProperties false, so the iterator reaches the Proxy.
- The inspector synchronously invokes the Proxy's ownKeys and getOwnPropertyDescriptor traps, running page JavaScript.
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.
When you log a Map to the browser console, the developer tools build a preview of its contents. This report says that while building that preview, the tools can accidentally run JavaScript that the page itself controls, through a special object called a Proxy. Running page code in the middle of the tools' own work is risky because it can change things the tools are still using, which might crash or corrupt memory.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.