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.mmcomponents/autofill/core/common/form_field_data.hcomponents/autofill/ios/form_util/form_activity_tab_helper.mmcomponents/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).
// 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.
- A page script retrieves the
remoteFrameTokenfor the frame, which is exposed in the DOM attribute__gCrRemoteFrameTokenby an isolated-world script. - The page sends a crafted
form.submitcommand usingwebkit.messageHandlers.ProgrammaticFormSubmissionHandlerMessage.postMessage. - The payload contains a
formDataobject where a field'smax_lengthis-1and a child frame'spredecessoris-2. - The browser process receives the message, and
FormActivityTabHelperinvokesExtractFormData. - The corrupted
max_lengthpropagates to downstream consumers (likeFormStructureRationalizer), while the invalidpredecessortriggers a crash inFormForest::UpdateTreeOfRendererFormduring form flattening.
Potential Impact
- Denial of Service: An attacker can remotely crash the browser process on iOS by providing a
predecessorvalue less than -1, triggering abase::checked_castfailure inform_forest.cc. - Logic Errors / Memory Corruption: The sign-extended
max_length(set toUINT64_MAX) breaks safe-math assumptions in the browser process. For example,offset += field->max_length();inform_structure_rationalizer.ccwill 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.
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
- A page script retrieves the remoteFrameToken for the frame from the DOM attribute.
- The page sends a crafted form.submit command using the ProgrammaticFormSubmissionHandlerMessage handler.
- The payload contains a formData object with a field's max_length set to -1 and a child frame's predecessor set to -2.
- The browser process receives the message and FormActivityTabHelper invokes ExtractFormData.
- 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.