Insufficient validation of untrusted input in Accessibility (CVE-2026-17713)
A function in the Android browser process switches over an image annotation status value that a compromised renderer can set to any integer, and because the switch has no default case and no trailing return, an out-of-range value makes execution fall off the end of a non-void function. The report claims this undefined behaviour could lead to memory corruption in the unsandboxed browser process, potentially enabling a sandbox escape, though no proof of concept was built.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 54 days
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 potential undefined behavior (UB) vulnerability exists in the Android browser process due to a missing default fallback in a switch statement within BrowserAccessibilityAndroid::GetImageAnnotationText(). A compromised renderer can supply an out-of-range integer value for kImageAnnotationStatus, which is cast to an enum and bypasses all switch cases, causing execution to fall off the end of a non-void function. On optimized Android release builds, this can lead to memory safety violations such as the destruction of an unconstructed std::u16string or wild control flow.
Affected files:
content/browser/accessibility/browser_accessibility_android.ccui/accessibility/ax_node_data.cc
Estimated timestamp from git blame: 2026-02-13
Location
content/browser/accessibility/browser_accessibility_android.cc(specifically inBrowserAccessibilityAndroid::GetImageAnnotationText(), lines 2777-2803)ui/accessibility/ax_node_data.cc
Description
In BrowserAccessibilityAndroid::GetImageAnnotationText(), the function returns a std::u16string by value and performs a switch over the ax::mojom::ImageAnnotationStatus of the node:
std::u16string BrowserAccessibilityAndroid::GetImageAnnotationText() const {
auto* manager =
static_cast<BrowserAccessibilityManagerAndroid*>(this->manager());
if (!manager->ShouldAllowImageDescriptions()) {
return std::u16string();
}
auto status = GetData().GetImageAnnotationStatus();
switch (status) {
case ax::mojom::ImageAnnotationStatus::kEligibleForAnnotation:
case ax::mojom::ImageAnnotationStatus::kAnnotationPending:
case ax::mojom::ImageAnnotationStatus::kAnnotationEmpty:
case ax::mojom::ImageAnnotationStatus::kAnnotationAdult:
case ax::mojom::ImageAnnotationStatus::kAnnotationProcessFailed:
return GetLocalizedStringForImageAnnotationStatus(status);
case ax::mojom::ImageAnnotationStatus::kAnnotationSucceeded:
return GetString16Attribute(ax::mojom::StringAttribute::kImageAnnotation);
case ax::mojom::ImageAnnotationStatus::kNone:
case ax::mojom::ImageAnnotationStatus::kWillNotAnnotateDueToScheme:
case ax::mojom::ImageAnnotationStatus::kIneligibleForAnnotation:
case ax::mojom::ImageAnnotationStatus::kSilentlyEligibleForAnnotation:
return std::u16string();
}
} // UB: falls off the end of a non-void function if status is out of range
The switch covers all 10 defined enum values, which satisfies the compiler's static analysis and suppresses -Wreturn-type warnings under -Werror. However, the status is retrieved via a raw static cast of a renderer-supplied integer without range validation in ui/accessibility/ax_node_data.cc:
ax::mojom::ImageAnnotationStatus AXNodeData::GetImageAnnotationStatus() const {
return static_cast<ax::mojom::ImageAnnotationStatus>(
GetIntAttribute(ax::mojom::IntAttribute::kImageAnnotationStatus));
}
Since the mapped Mojo attributes can be supplied with arbitrary int32 values by a compromised renderer, an out-of-range integer (e.g., 100) bypasses all cases inside the switch. Because there is no default case and no trailing return statement, control falls off the end of the non-void function. This is undefined behavior in C++.
Potential Impact and Exploitation Pathway
In optimized official release builds for Android, Clang lowers this fall-off-end scenario to a __builtin_unreachable(). This can manifest in two major ways depending on compiler codegen:
- Unconstructed Stack Temporary Usage: The caller allocated a temporary stack location for the returned
std::u16string(following the Itanium C++ ABI for structure return values). Because the callee falls off the end, the string's constructor is never executed. Back in the caller (ComputeAndroidNameTo()), the code calls.empty()and subsequently the destructor~basic_string()on this uninitialized stack region. If the uninitialized memory points to a heap location, this can trigger a free on an arbitrary, attacker-controlled address (via stack grooming). - Wild Control Flow: The compiler might optimize the jump table dispatch by omitting the bounds check on the index (relying on the assumption that out-of-bounds is unreachable), turning the renderer-controlled integer into an arbitrary indirect jump.
Either of these outcomes results in memory corruption inside the unsandboxed browser process of Android, providing a path for sandbox escape.
Potential Steps to Trigger the Vulnerability
Note: These steps are theoretical and potential, as we currently do not have a working automated environment or PoC to execute and verify the payload.
- From a compromised renderer, send a customized
AXTreeUpdateover theRenderAccessibilityHost::HandleAXEventsMojo pipe. - In the
AXNodeDataof the update, include an image node (role = ax::mojom::Role::kImage) withint_attributes[kImageAnnotationStatus]set to an arbitrary value (e.g.,100). KeepkNameFromunset. - In the browser process, trigger an accessibility lookup (e.g., via TalkBack/JNI query) that forces the evaluation of the node's content description.
- Ensure Chrome's "Get image descriptions" setting is enabled. The call chain will resolve to
GetImageAnnotationText(), bypass the switch statement, and fall off the end of the function, resulting in undefined behavior.
Suggested Fix
Add a fallback return statement at the end of the function (after the switch block) or include a default case in the switch to prevent falling off the end. For example:
switch (status) {
// ... existing cases ...
}
NOTREACHED();
return std::u16string();
}
Evaluated with Chrome root at commit: e9507a33bb4148ee071aaaf8a7e9ad68770359bf
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 a switch over a renderer-controlled enum value with no default case and no trailing return, so an out-of-range integer falls off the end of a non-void function.
Impact
The report claims this could cause memory corruption in the unsandboxed Android browser process and provide a path for sandbox escape, but the steps are theoretical and no working exploit was produced.
What the attacker needed
Compromised renderer; image descriptions setting enabled; accessibility lookup triggered
The fix
A fallback return or default case should be added after the switch so the function can never fall off its end.
How it was found
- From a compromised renderer, send a crafted accessibility tree update over the Mojo pipe.
- Include an image node whose image annotation status integer is set to an out-of-range value.
- Trigger an accessibility lookup in the browser process that evaluates the node's content description.
- With image descriptions enabled, the call reaches the vulnerable function and falls off its end.
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 renderer is the part of the browser that draws web pages and is kept in a sandbox so a hacked page cannot harm the rest of the system. Here the renderer can send a number that the browser code assumes is always one of a known set, and when it is not, the function ends without returning a value, which in C++ is undefined behaviour. The report argues this could corrupt memory in the more privileged browser process, but it was never demonstrated.
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.