Skip to content
Memory corruption Advisory Advanced CVE-2026-85047

Improper input validation in Transactions Platform (CVE-2026-85047)

The iOS autofill component casts web-supplied numeric values for max_length and predecessor to signed integers without range checks, so negative values become huge unsigned numbers or trigger a checked cast failure. An attacker could crash the browser process or cause logic errors that may lead to memory corruption.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 4 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: ExtractFormData in the iOS autofill component incorrectly handles negative integer values provided by web content for max_length and predecessor fields. These values are cast through signed integers without range validation, leading to sign-extension or browser-process crashes during subsequent processing.

Affected files:

  • components/autofill/ios/browser/autofill_util.mm
  • components/autofill/core/common/form_field_data.h
  • components/autofill/ios/form_util/form_activity_tab_helper.mm
  • components/autofill/ios/form_util/programmatic_form_submission_handler_java_script_feature.mm

Estimated timestamp from git blame: 2025-02-28

Description

A potential vulnerability exists in components/autofill/ios/browser/autofill_util.mm where values provided by web content via script messages are incorrectly converted from doubles to integers.

In ExtractFormFieldData, a max_length value from a JSON dictionary is cast to a signed int and then implicitly to a uint64_t. If a website provides a negative value like -1.0, it is sign-extended to UINT64_MAX (0xFFFFFFFFFFFFFFFF).

C++
// components/autofill/ios/browser/autofill_util.mm:357
if (std::optional<double> max_length = field.FindDouble("max_length")) {
  field_data->set_max_length(((int)*max_length));
}

This violates the documented invariant that FormFieldData::max_length should be <= UINT32_MAX to ensure browser-process arithmetic is safe from overflows. A similar pattern exists in ExtractRemoteFrameToken for the predecessor field (line 455), which can trigger a base::checked_cast failure and crash the browser process.

Reachability and Potential Trigger Path

The issue is reachable from untrusted web content on iOS via the ProgrammaticFormSubmissionHandlerMessage script message handler.

  1. A page script retrieves the remoteFrameToken for the frame, which is exposed in the DOM attribute __gCrRemoteFrameToken by an isolated-world script.
  2. The page sends a crafted form.submit command using webkit.messageHandlers.ProgrammaticFormSubmissionHandlerMessage.postMessage.
  3. The payload contains a formData object where a field's max_length is -1 and a child frame's predecessor is -2.
  4. The browser process receives the message, and FormActivityTabHelper invokes ExtractFormData.
  5. The corrupted max_length propagates to downstream consumers (like FormStructureRationalizer), while the invalid predecessor triggers a crash in FormForest::UpdateTreeOfRendererForm during form flattening.

Potential Impact

  1. Denial of Service: An attacker can remotely crash the browser process on iOS by providing a predecessor value less than -1, triggering a base::checked_cast failure in form_forest.cc.
  2. Logic Errors / Memory Corruption: The sign-extended max_length (set to UINT64_MAX) breaks safe-math assumptions in the browser process. For example, offset += field->max_length(); in form_structure_rationalizer.cc will overflow, potentially leading to out-of-bounds reads or writes in browser-process memory if used for buffer indexing.

Suggested Fix

Validate all numeric values extracted from web content in components/autofill/ios/browser/autofill_util.mm. Ensure max_length is non-negative and capped at UINT32_MAX, and verify that predecessor is >= -1 before casting.

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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 code casts a double from web content directly to a signed int and then to an unsigned 64-bit integer without validating that the value is non-negative and within the documented range.

Impact

An attacker could remotely crash the browser process on iOS, and the sign-extended max_length may cause logic errors that could lead to out-of-bounds memory access.

What the attacker needed

Victim visits a malicious web page; iOS browser with autofill; page script can access remoteFrameToken

The fix

The code should validate all numeric values from web content, ensuring max_length is non-negative and capped at UINT32_MAX and predecessor is at least -1 before casting.

How it was found

  1. A page script retrieves the remoteFrameToken for the frame from the DOM attribute.
  2. The page sends a crafted form.submit command using the ProgrammaticFormSubmissionHandlerMessage handler.
  3. The payload contains a formData object with a field's max_length set to -1 and a child frame's predecessor set to -2.
  4. The browser process receives the message and FormActivityTabHelper invokes ExtractFormData.
  5. The corrupted max_length propagates downstream while the invalid predecessor triggers a crash during form flattening.

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 web page can send numbers to the browser's autofill code. The code turns those numbers into a different type without checking they are sensible, so a negative number becomes an enormous positive one. That can crash the browser or confuse later calculations.

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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.