Incomplete cleanup in Browser (CVE-2026-113073)
A logic flaw in the browser's history embeddings helper fails to clear stale URL and visit-time state when a cross-document navigation ends in a 404. An attacker could associate their own page content with a victim URL in the local history database, causing spoofed search snippets and AI prompt context.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 5 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: A logic flaw in HistoryEmbeddingsTabHelper::DidFinishNavigation fails to fully invalidate internal state on cross-document navigations that result in a 404. This potentially allows an attacker to associate arbitrary page passages and embeddings with a cross-origin victim URL in the local history database. This can lead to persistent cross-origin content spoofing in history search results and on-device AI prompts.
Affected files:
chrome/browser/history_embeddings/history_embeddings_tab_helper.cc
Estimated timestamp from git blame: 2026-05-29
Description
A potential logic vulnerability exists in HistoryEmbeddingsTabHelper where the state-clearance mechanism is incomplete during cross-document navigations that result in an HTTP 404 status code.
When a 404 page commits, HistoryTabHelper::DidFinishNavigation (chrome/browser/history/history_tab_helper.cc:500) skips notifying its observers. Because of this, HistoryEmbeddingsTabHelper::OnUpdatedHistoryForNavigation is never invoked, leaving history_url_ and history_visit_time_ populated with the stale values from the previous navigation (e.g., a victim URL).
Additionally, the override HistoryEmbeddingsTabHelper::DidFinishNavigation (chrome/browser/history_embeddings/history_embeddings_tab_helper.cc:58-66) only erases last_history_visit_[web_contents] but does not cancel pending database lookup tasks or reset the history_url_ and history_visit_time_ members. As a result, when the attacker's 404 page completes loading, DidFinishLoad triggers a database lookup for the stale victim URL, or an in-flight lookup from the victim's load completes, writing the victim's visit metadata back into the service's tracking map. Subsequently, the attacker's 404 page content embeddings are stored under the victim's url_id in the history database.
Potential Attack Scenario
(Note: Our tooling agent does not currently have the capability to execute code; this sequence represents potential steps based on codebase analysis)
- A user visits
https://attacker.comand interacts with the page (granting transient user activation). - The attacker's script opens a victim page in a new window/tab:
const w = window.open('https://victim.com/real-page');. - The victim page commits, and
HistoryEmbeddingsTabHelpersaves the victim's URL and visit timeT_vin its member variables. - Before the victim's history-thread database lookup completes or before its load finishes, the attacker redirects the window
wtohttps://attacker.com/poison(which returns an HTTP 404 with custom spoof passages in its body). - The 404 page commits, clearing the metadata map but leaving the stale
history_url_(victim GURL) andhistory_visit_time_(T_v) intact, and leaving any pending lookups uncancelled. - When the 404 page fires
DidFinishLoad, it either triggers a new query for the victim's URL (Path A) or allows the victim's original pending callback to finish (Path B). In both cases, the victim's metadata is stored inlast_history_visit_[w]. - Once the page content embeddings for the attacker's 404 page are computed,
HistoryEmbeddingsService::OnPageEmbeddingsAvailableretrieves the metadata mapped tow(which is the victim's URL/visit ID) and stores the attacker's spoofed passages under the victim's entry in the history database.
Impact
An attacker can persistently overwrite the history embeddings database for any cross-origin URL with attacker-controlled text. This text then surfaces in chrome://history search snippets attributed to the victim origin and can be fed into the browser's on-device AI prompt as trusted context from the victim. This logic flaw resides entirely in the browser process and does not require a renderer compromise.
Suggested Fix
Modify HistoryEmbeddingsTabHelper::DidFinishNavigation to fully invalidate the helper's state on any cross-document commit by calling CancelHistoryLookup() and resetting the stale member variables:
void HistoryEmbeddingsTabHelper::DidFinishNavigation(
content::NavigationHandle* navigation_handle) {
if (navigation_handle->IsInPrimaryMainFrame() &&
navigation_handle->HasCommitted() &&
!navigation_handle->IsSameDocument()) {
CancelHistoryLookup();
history_visit_time_.reset();
history_url_.reset();
GetHistoryEmbeddingsService()->UpdateVisitMetadata(web_contents(),
std::nullopt);
}
}
Evaluated with Chrome root at commit: 87214e6721f6c34afd9181b80769a24c0c601c50
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 navigation handler only erases one tracking map entry but does not cancel pending database lookups or reset the stored history URL and visit time, so stale victim metadata survives a 404 commit.
Impact
An attacker could persistently overwrite the history embeddings database for any cross-origin URL with attacker-controlled text, which then surfaces in history search snippets and on-device AI prompts attributed to the victim origin.
What the attacker needed
Victim visits attacker page; user activation on attacker page; victim page loads in new window; attacker page returns HTTP 404
The fix
The helper's navigation handler should be modified to cancel any pending history lookup and reset the stored history URL and visit time on every cross-document commit.
How it was found
- A user visits the attacker's site and interacts with it, granting transient user activation.
- The attacker's script opens a victim page in a new window or tab.
- The victim page commits and the helper saves the victim's URL and visit time.
- Before the victim's lookup or load finishes, the attacker redirects the window to an attacker page that returns HTTP 404 with spoofed passages.
- The 404 page commits, clearing the metadata map but leaving the stale victim URL and visit time intact.
- When the 404 page finishes loading, the victim's metadata is stored for the window and the attacker's embeddings are saved under the victim's entry.
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.
The browser keeps a small local database that stores snippets of pages you visit so it can search your history and feed an on-device AI. A bug means that when a page fails to load with a 404 error, the browser forgets to clear the previous page's address from its notes. An attacker can use this to make their own text appear as if it came from a trusted site in your history search results.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.