Chrome · Autofill AI › PI
CVE-2026-106343
Input Validation in Autofill AI (PI)
Overview
Low
Severity
—
CVSS
No
Exploited ITW
Fixed
Fix Status
Changed Functions
| Function | Change | Notes |
|---|---|---|
MockAmountExtractionManagercomponents/autofill/core/browser/foundations/browser_autofill_manager_unittest.cc |
modified |
Files Changed
components/autofill/core/browser/foundations/browser_autofill_manager_unittest.cccomponents/autofill/core/browser/foundations/browser_autofill_manager.cc
Patch
From f1e078de45c8362e89a5512d7b189b5171432956 Mon Sep 17 00:00:00 2001
From: Timofey Chudakov <tchudakov@google.com>
Date: Mon, 14 Sep 2026 02:14:03 -0700
Subject: [PATCH] [PI] Do not show PI notice if CanShowAutofillUi returns false.
PI - Private Inference
CanShowAutofillUi checks if the current frame is still active.
Autofill UI should not be shown if for inactive frames.
Fixed: 553317583
Change-Id: I6abf723cf28657da0af94720028226becdde1157
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8397809
Reviewed-by: Christoph Schwering <schwering@google.com>
Commit-Queue: Timofey Chudakov <tchudakov@google.com>
Cr-Commit-Position: refs/heads/main@{#1697124}
---
diff --git a/components/autofill/core/browser/foundations/browser_autofill_manager.cc b/components/autofill/core/browser/foundations/browser_autofill_manager.cc
index f1e9140..c920e17 100644
--- a/components/autofill/core/browser/foundations/browser_autofill_manager.cc
+++ b/components/autofill/core/browser/foundations/browser_autofill_manager.cc
@@ -1314,6 +1314,10 @@
bool BrowserAutofillManager::MaybeShowPrivateInferenceNotice(
base::span<const Suggestion> autofill_ai_suggestions) {
+ if (!driver().CanShowAutofillUi()) {
+ return false;
+ }
+
if (std::ranges::contains(autofill_ai_suggestions,
SuggestionType::kAutofillAiPrivateInferenceNotice,
&Suggestion::type)) {
diff --git a/components/autofill/core/browser/foundations/browser_autofill_manager_unittest.cc b/components/autofill/core/browser/foundations/browser_autofill_manager_unittest.cc
index 3418a45..37c4ad5 100644
--- a/components/autofill/core/browser/foundations/browser_autofill_manager_unittest.cc
+++ b/components/autofill/core/browser/foundations/browser_autofill_manager_unittest.cc
@@ -788,6 +788,7 @@
SendTypePredictionsToRenderer,
((const FormStructure&)),
(override));
+ MOCK_METHOD(bool, CanShowAutofillUi, (), (const override));
};
class MockAmountExtractionManager : public payments::AmountExtractionManager {
@@ -1007,6 +1008,7 @@
payments_autofill_client()
.SetUpDeviceBiometricAuthenticatorSuccessOnAutomotive();
#endif
+ ON_CALL(autofill_driver(), CanShowAutofillUi).WillByDefault(Return(true));
}
void TearDown() override { DestroyAutofillClient(); }
@@ -6205,6 +6207,32 @@
// Tests that Autofill suggestions are shown if TouchToFillAutofill is not
// eligible.
TEST_F(BrowserAutofillManagerTest_MockAutofillAi,
+ PrivateInferenceNotice_DoesNotShowIfAutofillUiCantBeShown) {
+ EXPECT_CALL(autofill_driver(), CanShowAutofillUi)
+ .WillRepeatedly(Return(false));
+ SeeForm(/*may_run_model=*/false);
+
+ std::vector<Suggestion> suggestions = {
+ Suggestion(SuggestionType::kAutofillAiPrivateInferenceNotice)};
+ EXPECT_CALL(mock_ai_manager(), GetSuggestions).WillOnce(Return(suggestions));
+
+ EXPECT_CALL(touch_to_fill_autofill_delegate(), TryToShowTouchToFill)
+ .WillOnce(testing::Return(false));
+ // The private inference notice should be shown when touch to fill bottom
+ // sheet is shown.
+ EXPECT_CALL(autofill_client(), ShowAutofillAiPrivateInferenceNotice).Times(0);
+ TryToShowTouchToFill(passport_form(), passport_form().fields().front(),
+ /*form_element_was_clicked=*/true);
+ EXPECT_THAT(external_delegate()->suggestions(),
+ ElementsAre(Field(
+ &Suggestion::type,
+ Eq(SuggestionType::kAutofillAiPrivateInferenceNotice))));
+ EXPECT_TRUE(external_delegate()->on_suggestions_returned_seen());
+}
+
+// Tests that Autofill suggestions are shown if TouchToFillAutofill is not
+// eligible.
+TEST_F(BrowserAutofillManagerTest_MockAutofillAi,
TouchToFillAutofillSuggestion_DoesNotShowIfNotEligible) {
SeeForm(/*may_run_model=*/false);
Loading diff…
Regression Test / PoC
shipped with the fix
diff --git a/components/autofill/core/browser/foundations/browser_autofill_manager_unittest.cc b/components/autofill/core/browser/foundations/browser_autofill_manager_unittest.cc
index 3418a45..37c4ad5 100644
--- a/components/autofill/core/browser/foundations/browser_autofill_manager_unittest.cc
+++ b/components/autofill/core/browser/foundations/browser_autofill_manager_unittest.cc
@@ -788,6 +788,7 @@
SendTypePredictionsToRenderer,
((const FormStructure&)),
(override));
+ MOCK_METHOD(bool, CanShowAutofillUi, (), (const override));
};
class MockAmountExtractionManager : public payments::AmountExtractionManager {
@@ -1007,6 +1008,7 @@
payments_autofill_client()
.SetUpDeviceBiometricAuthenticatorSuccessOnAutomotive();
#endif
+ ON_CALL(autofill_driver(), CanShowAutofillUi).WillByDefault(Return(true));
}
void TearDown() override { DestroyAutofillClient(); }
@@ -6205,6 +6207,32 @@
// Tests that Autofill suggestions are shown if TouchToFillAutofill is not
// eligible.
TEST_F(BrowserAutofillManagerTest_MockAutofillAi,
+ PrivateInferenceNotice_DoesNotShowIfAutofillUiCantBeShown) {
+ EXPECT_CALL(autofill_driver(), CanShowAutofillUi)
+ .WillRepeatedly(Return(false));
+ SeeForm(/*may_run_model=*/false);
+
+ std::vector<Suggestion> suggestions = {
+ Suggestion(SuggestionType::kAutofillAiPrivateInferenceNotice)};
+ EXPECT_CALL(mock_ai_manager(), GetSuggestions).WillOnce(Return(suggestions));
+
+ EXPECT_CALL(touch_to_fill_autofill_delegate(), TryToShowTouchToFill)
+ .WillOnce(testing::Return(false));
+ // The private inference notice should be shown when touch to fill bottom
+ // sheet is shown.
+ EXPECT_CALL(autofill_client(), ShowAutofillAiPrivateInferenceNotice).Times(0);
+ TryToShowTouchToFill(passport_form(), passport_form().fields().front(),
+ /*form_element_was_clicked=*/true);
+ EXPECT_THAT(external_delegate()->suggestions(),
+ ElementsAre(Field(
+ &Suggestion::type,
+ Eq(SuggestionType::kAutofillAiPrivateInferenceNotice))));
+ EXPECT_TRUE(external_delegate()->on_suggestions_returned_seen());
+}
+
+// Tests that Autofill suggestions are shown if TouchToFillAutofill is not
+// eligible.
+TEST_F(BrowserAutofillManagerTest_MockAutofillAi,
TouchToFillAutofillSuggestion_DoesNotShowIfNotEligible) {
SeeForm(/*may_run_model=*/false);
Loading diff…
Original Bug Report
The reporter's bug is still restricted on the tracker. Chrome de-restricts security bugs ~30–90 days after the fix ships; a later run will backfill it here.
References
On This Page