Use of released resource in Mobile (CVE-2026-85044)
Chrome for Android's context menu captures an initiator frame token but does not hold a NavigationStateKeepAlive, so if the initiating subframe is removed while the menu is open, navigating via 'Open in new tab' uses a stale token. This causes the browser process to fail open, potentially bypassing Local Network Access, ConnectionAllowlist, and sandbox initiator checks.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 months
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: Chrome for Android's context menu captures an initiator frame token but does not hold a NavigationStateKeepAlive. If the initiating subframe is removed while the asynchronous context menu is open, navigating via the new tab uses a stale frame token. This causes the browser process to fail open on release builds, potentially bypassing Local Network Access (LNA), ConnectionAllowlist, and sandbox initiator security checks.
Affected files:
chrome/browser/ui/android/context_menu_helper.cccomponents/embedder_support/android/contextmenu/context_menu_builder.cc
Estimated timestamp from git blame: 2023-07-05
Summary
A potential security policy bypass exists on Chrome for Android when initiating a navigation from the long-press "Open in new tab" context menu. The parameters created for the context menu capture the initiator frame token but do not register or hold a NavigationStateKeepAlive for the initiating frame. If an attacker-controlled page destroys the subframe while the context menu is displayed, navigating from the menu uses a stale frame token. This causes the browser process to fail open, potentially bypassing Local Network Access (LNA), ConnectionAllowlist, and sandbox initiator security checks.
Root Cause & Vulnerability Details
When a user long-presses a link inside a subframe on Android, ContextMenuHelper::ShowContextMenu in chrome/browser/ui/android/context_menu_helper.cc captures the initiator frame's token and process ID and passes them to JNI via AdditionalNavigationParams:
// chrome/browser/ui/android/context_menu_helper.cc:75
context_menu::BuildJavaContextMenuParams(
context_menu_params_, model_ptr,
render_frame_host.GetProcess()->GetDeprecatedID(),
render_frame_host.GetFrameToken().value())
In components/embedder_support/android/contextmenu/context_menu_builder.cc:48, content::CreateJavaAdditionalNavigationParams is called to package these values into a Java AdditionalNavigationParams object. However, this JNI object only stores raw identifier values (mInitiatorFrameToken and mInitiatorProcessId) and does not register or retain any keep-alive mechanism like NavigationStateKeepAlive.
Because the Android native context menu is asynchronous and non-blocking, a script on the page can continue executing and remove the subframe (e.g., via iframe.remove()) after the context menu is displayed. When the subframe is destroyed, its RenderFrameHostImpl is deleted. Since no NavigationStateKeepAlive is active for the subframe, its PolicyContainerHost is also deallocated.
When the user subsequently clicks "Open in new tab":
- The browser navigates using the stale frame token and process ID.
- During request initialization,
RenderFrameHostImpl::GetPolicyContainerHost(incontent/browser/renderer_host/render_frame_host_impl.cc:2523) is called to retrieve the initiator's policies. - Because the subframe is destroyed and no keep-alive exists, both
RenderFrameHostImpl::FromFrameTokenand theStoragePartitionkeep-alive lookup returnnullptr, causingGetPolicyContainerHostto returnnullptr. - In release builds, the
DCHECK(initiator_policy_container_host)compiles out, resulting in null initiator policies (initiator_policies_inNavigationPolicyContainerBuilderis set tonullptr).
Security Consequences of Failing Open
With missing initiator policies, several security checks fail open:
- Local Network Access (LNA) Bypass:
NavigationRequest::BuildClientSecurityStateForNavigationFetch()incontent/browser/renderer_host/navigation_request.ccreturnsnullptrwhen initiator policies are missing. In the Network Service,LocalNetworkAccessChecker::Checkinservices/network/local_network_access_checker.ccsees a null client security state and returnsResult::kAllowedMissingClientSecurityState, bypassing LNA preflight checks. - ConnectionAllowlist Bypass: In
NavigationRequest::IsAllowedByConnectionAllowlist(), the absence of initiator policies causes the function to returntrueunconditionally, skippingConnection-Allowlistenforcement. - Sandbox Flag Dropping:
NavigationRequest::GetSandboxFlagsInitiatorreturnsnetwork::mojom::WebSandboxFlags::kNoneif the policy container host lookup fails, losing the sandbox initiator restriction.
Suggested Attack Steps (Unverified)
Note: These are potential steps to demonstrate the issue. Our tooling does not have the ability to run code or verify exploits on a live device.
- A parent page embeds a sandboxed cross-origin subframe:
<iframe id="sub" sandbox="allow-scripts" src="...">. - Inside the subframe, a link points to a private network address (e.g.,
<a href="http://192.168.1.1/">Target</a>). - The subframe listens for the
contextmenuevent. When triggered, it notifies the parent page. - The user performs a long-press on the link inside the subframe, bringing up the native context menu.
- In the background, the parent page removes the subframe (
sub.remove()). - The user selects "Open in new tab".
- The navigation fetch is dispatched without any
ClientSecurityStateor sandbox initiator restrictions, successfully bypassing LNA.
Proposed Fix
To resolve this issue, ContextMenuHelper should hold a keep-alive handle for the initiator frame while the context menu is active.
Specifically, we can call RenderFrameHostImpl::IssueKeepAliveHandle to generate a mojo::PendingReceiver<blink::mojom::NavigationStateKeepAliveHandle> and store the resulting mojo::Remote<blink::mojom::NavigationStateKeepAliveHandle> as a member variable in ContextMenuHelper. When the context menu is dismissed or closed, ContextMenuHelper::OnContextMenuClosed should destroy or reset this remote, freeing the keep-alive. This guarantees the initiator's policies and PolicyContainerHost remain in memory as long as the context menu is open.
Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8
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 context menu stores only raw frame identifiers without keeping the initiating frame's policy state alive, so the policy container host is freed before the navigation starts.
Impact
The navigation could bypass Local Network Access, ConnectionAllowlist, and sandbox initiator restrictions, though the report notes the attack steps are unverified.
What the attacker needed
Chrome for Android; victim long-presses a link in a subframe; attacker page removes the subframe; victim selects 'Open in new tab'
The fix
ContextMenuHelper should hold a keep-alive handle for the initiator frame while the context menu is active and release it when the menu closes.
How it was found
- A parent page embeds a sandboxed cross-origin subframe.
- Inside the subframe, a link points to a private network address.
- The subframe listens for the contextmenu event and notifies the parent page.
- The user long-presses the link inside the subframe, bringing up the native context menu.
- In the background, the parent page removes the subframe.
- The user selects 'Open in new tab', and the navigation fetch is dispatched without ClientSecurityState or sandbox initiator restrictions.
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 long-press a link on a web page in Chrome for Android, the browser remembers which part of the page the link came from so it can apply security rules when you open it. If that part of the page is deleted while the menu is still open, the browser loses track of those rules and may allow the link to reach places it normally could not, such as devices on your local network.
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.