Use after free in Core (CVE-2026-13861)
A potential use-after-free exists in RenderProcessHostImpl because a dangling BrowserContext pointer is used after the context is destroyed. A compromised renderer could exploit this to achieve a sandbox escape by hijacking virtual method calls.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 months
Flapjack (go/flapjack), an LLM-powered static analysis tool, has identified the following potential security issue.
Overview: A potential Use-After-Free vulnerability exists in RenderProcessHostImpl due to a dangling BrowserContext pointer. If an attacker can keep the host alive past the context's destruction, calling BindVideoDecodePerfHistory dereferences the freed memory. This allows a compromised renderer to achieve a sandbox escape by hijacking virtual method calls.
Affected files:
content/browser/renderer_host/render_process_host_impl.cccontent/browser/renderer_host/render_process_host_impl.h
Estimated timestamp from git blame: 2024-04-24
Conclusion: A potential Use-After-Free in RenderProcessHostImpl::BindVideoDecodePerfHistory allows a compromised renderer to achieve a Sandbox Escape in the browser process.
Initial logic and parameters regarding RenderProcessHostImpl lifetime and BrowserContext destruction are validated. The browser_context_ pointer is explicitly marked with RAW_PTR_EXCLUSION, bypassing MiraclePtr protections. If a listener (e.g., RenderFrameHostImpl) is leaked, RenderProcessHostImpl::Cleanup() aborts early, leaving browser_context_ as a dangling pointer when the associated profile is destroyed.
Standard processing applied for memory reclamation.
Jumping to the final exploitation phase: Invoking the media::mojom::VideoDecodePerfHistory Mojo interface via BindVideoDecodePerfHistory directly retrieves the dangling browser_context_ pointer. By controlling the reclaimed BrowserContext memory, the attacker dictates the impl_ pointer, causing GetVideoDecodePerfHistory() to return a fake object. The Mojo ReceiverSet::Add operation binds the receiver directly to this attacker-controlled fake object. Subsequent Mojo IPC messages routed to this receiver trigger virtual function calls (e.g., GetPerfInfo) using an attacker-supplied vtable, resulting in immediate arbitrary code execution in the browser process.
Evaluated with Chrome root at commit: 9760e6c70cd33a320713361f17c6dcca85648c0f
Results from Flapjack so far have been promising, but it can be wrong in its deductions. At this time, it does not produce proof of concepts or fuzzer tests. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve Flapjack’s 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 browser_context_ pointer is not cleared when the BrowserContext is destroyed, and early abort in Cleanup() leaves it dangling, allowing later use in BindVideoDecodePerfHistory.
Impact
A compromised renderer could achieve a sandbox escape and execute arbitrary code in the browser process.
What the attacker needed
Compromised renderer; leaked listener (e.g., RenderFrameHostImpl); control over reclaimed memory
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.
A use-after-free happens when a program keeps using memory after it has been freed. Here, a pointer to a browser context is left dangling, and if an attacker can control what replaces that memory, they can trick the browser into running their code. This could let a malicious renderer process escape its sandbox and run code in the more privileged browser process.
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.