CVE-2026-11277
Overview
Files Changed
ios/chrome/browser/reader_mode/model/reader_mode_web_state_delegate.mm
Patch
From c6574c621f443fd1ea1d32b7aa38fa83b6311417 Mon Sep 17 00:00:00 2001 From: Quentin Pubert <[email protected]> Date: Mon, 27 Apr 2026 03:18:17 -0700 Subject: [PATCH] [iOS] Deny permission requests in Reader mode WebState This CL makes the Reader mode WebState delegate deny permission requests (`PermissionDecisionDeny`) instead of showing a prompt (`PermissionDecisionShowDefaultPrompt`). Bug: 501839664 Change-Id: I5329636f89249e7cccc999fedcb5943d2bf04908 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7777012 Reviewed-by: Olivier Robin <[email protected]> Auto-Submit: Quentin Pubert <[email protected]> Commit-Queue: Olivier Robin <[email protected]> Cr-Commit-Position: refs/heads/main@{#1620979} --- diff --git a/ios/chrome/browser/reader_mode/model/reader_mode_web_state_delegate.mm b/ios/chrome/browser/reader_mode/model/reader_mode_web_state_delegate.mm index 4252a5b..b6e2dfbb 100644 --- a/ios/chrome/browser/reader_mode/model/reader_mode_web_state_delegate.mm +++ b/ios/chrome/browser/reader_mode/model/reader_mode_web_state_delegate.mm @@ -67,7 +67,7 @@ web::WebState* source, NSArray<NSNumber*>* permissions, web::WebStatePermissionDecisionHandler handler) { - handler(web::PermissionDecisionShowDefaultPrompt); + handler(web::PermissionDecisionDeny); } void ReaderModeWebStateDelegate::ContextMenuConfiguration(
Original Bug Report
Potential parental control bypass for Camera/Mic via iOS Reader Mode
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 without the Chrome Security team.
Overview: In iOS Chrome, the Reader Mode WebState delegate unconditionally allows media permission prompts, bypassing parental control blocks. Furthermore, Reader Mode distillation does not sanitize inline event handlers and lacks a Content Security Policy (CSP). This allows a malicious page to execute scripts in Reader Mode and trigger camera/microphone permission prompts for supervised users.
Affected files:
ios/chrome/browser/reader_mode/model/reader_mode_web_state_delegate.mmios/chrome/browser/reader_mode/model/reader_mode_content_tab_helper.mmios/chrome/browser/web/model/web_state_delegate_browser_agent.mm
Estimated timestamp from git blame: 2025-07-28
Description
A potential vulnerability exists in iOS Chrome where supervised users can bypass parental “Block” settings for Camera and Microphone permissions by using Reader Mode.
When a page is distilled for Reader Mode, Chrome utilizes a modified version of Readability.js (third_party/readability/modded_src/Readability.js). While this script strips out <script> tags, it does not sanitize inline event handlers such as onerror on <img> tags. Subsequently, ReaderModeDistillerViewer::OnArticleReady wraps the distilled content in an HTML template via GetArticleTemplateHtml. Because it passes use_offline_data=false, no Content Security Policy (CSP) is injected into the template to prevent inline script execution.
The resulting HTML is loaded into a secondary WebState using LoadData, maintaining the attacker’s original URL. This WebState uses ReaderModeWebStateDelegate, which implements HandlePermissionsDecisionRequest by unconditionally returning web::PermissionDecisionShowDefaultPrompt. This skips the IsMicOrCameraAccessSubjectToParentalControls check that is correctly enforced by the standard WebStateDelegateBrowserAgent.
As a result, a script executing via an inline event handler in Reader Mode can call navigator.mediaDevices.getUserMedia(), bypassing the silent parental block and presenting the child with a native iOS permission prompt. If the child taps “Allow”, the attacker’s origin is granted access.
Potential Reproduction Steps
(Note: These are suggested steps based on code analysis; our tooling agent does not yet have the ability to run code to provide a working proof of concept).
- Configure a supervised Chrome profile (via Family Link) on an iOS device, setting Camera and Microphone permissions to ‘Block’.
- Host an HTTPS page eligible for Reader Mode containing a payload like:
<img src="x" onerror="navigator.mediaDevices.getUserMedia({video:true})">. - Navigate to the page on the supervised iOS device and enter Reader Mode.
- Observe that the
onerrorhandler executes and triggers a native iOS permission prompt (e.g., ‘“attacker.com” Would Like to Access the Camera’). - Tapping ‘Allow’ grants the permission, bypassing the intended parental block.
Suggested Fix
- Enforce Parental Controls in Reader Mode: Update
ReaderModeWebStateDelegate::HandlePermissionsDecisionRequestto either perform theIsMicOrCameraAccessSubjectToParentalControlscheck directly or forward the permission request to theoriginal_web_state_’s delegate to ensure consistent policy enforcement. - Enforce CSP in Reader Mode: Consider injecting a strict Content Security Policy for iOS Reader Mode (e.g., by modifying how
GetArticleTemplateHtmlhandles CSP injection) to proactively block inline scripts (unsafe-inline) from executing in distilled content.
Evaluated with Chrome root at commit: 096fc8fdbfacf2546485756d03f160a3d04fcc9b
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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.