Skip to content
Access control Advisory Advanced CVE-2026-121031

Missing authorization in PDF (CVE-2026-121031)

A logic flaw in the executeScript API for webview and controlledframe allows a malicious app to inject scripts into the privileged PDF extension frame, bypassing extension isolation. An attacker could then execute arbitrary code in the PDF extension's main world, gaining access to powerful chrome.* APIs.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 7 months

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: A logic flaw in programmatic script injection allows a malicious Chrome App or Isolated Web App to execute arbitrary scripts within the highly privileged PDF extension frame using <webview>.executeScript({allFrames: true}). By injecting a blob URL script, the attacker escapes the isolated world and executes code in the extension's main world, gaining access to powerful chrome.* APIs.

Affected files:

  • extensions/renderer/programmatic_script_injector.cc
  • extensions/browser/script_executor.cc
  • extensions/browser/url_request_util.cc

Estimated timestamp from git blame: 2024-04-12

Description

A potential security vulnerability exists in the implementation of the executeScript API for <webview> (Platform Apps) and <controlledframe> (Isolated Web Apps). When the allFrames: true option is used on a guest page embedding a PDF, programmatic script injection can reach the Out-of-Process IFrame (OOPIF) PDF extension frame (chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html), which runs in a highly privileged kPrivilegedExtension context.

This vulnerability is caused by two logic failures that allow the injection to bypass standard extension isolation:

  1. Browser-side Enumeration Failure (extensions/browser/script_executor.cc): The MaybeAddSubFrame function attempts to skip children of the PDF extension frame to prevent scripting the inner PDF content. However, it only checks if a frame's parent's origin is the PDF extension ID. Since the PDF extension frame itself is a subframe of the embedding guest page, its parent is the guest origin, not the extension. Consequently, the extension frame is not skipped and is targeted for script injection.

  2. Renderer-side Check Bypass (extensions/renderer/programmatic_script_injector.cc): In CanExecuteOnFrame, the renderer returns kAllowed for any subframe when is_web_view is true. This early return occurs before calling ExtensionInjectionHost::CanExecuteOnFrame, which contains the strict cross-extension scripting block (in extension_injection_host.cc) that would normally prevent one extension or app from scripting another.

Once injected into the PDF extension's isolated world, an attacker can escalate to the main world. The PDF extension's manifest (chrome/browser/resources/pdf/manifest.json) permits blob: URLs in its script-src Content Security Policy. An attacker can create a blob: URL containing a malicious payload and append it as a <script> tag to the DOM. Because blob URLs inherit the origin of the document that created them, the payload executes in the main world with the PDF extension's full privileges.

Impact

Successful exploitation provides full access to the PDF extension's privileged chrome.* APIs, including:

  • chrome.contentSettings: Can be used to silently modify camera, microphone, and location settings for any origin profile-wide.
  • chrome.tabs: Can enumerate all open tabs and their URLs.
  • chrome.fileSystem: Allows writing to the file system.
  • chrome.metricsPrivate, chrome.pdfViewerPrivate, and chrome.resourcesPrivate.

Potential Steps to Reproduce

(Note: These are potential steps as our tooling does not yet have the ability to run code.)

  1. Create a Platform App with the webview permission (or an Isolated Web App with controlledframe).
  2. In the app, create a <webview> and set its src to a PDF URL, or embed a PDF within a guest page: <embed src='https://target.origin/test.pdf' type='application/pdf'>.
  3. Wait for the PDF to load, which creates the extension frame as a subframe in the guest's frame tree.
  4. Call webview.executeScript({code: PAYLOAD, allFrames: true}).
  5. The PAYLOAD should create a Blob containing malicious code (e.g., using chrome.contentSettings) and inject it into the DOM via a <script> tag. Example payload:
    JavaScript
    const b = new Blob(['chrome.contentSettings.camera.set({primaryPattern:"https://evil.example/*",setting:"allow"})'], {type: 'text/javascript'});
    const s = document.createElement('script');
    s.src = URL.createObjectURL(b);
    document.head.appendChild(s);
    
  6. Verify that the profile-wide content settings have been modified as intended.

Suggested Fix

  1. In extensions/browser/script_executor.cc (MaybeAddSubFrame): The logic should be updated to check the frame's own origin in addition to the parent's origin to properly exclude the PDF extension frame from script execution targets.
  2. In extensions/renderer/programmatic_script_injector.cc (CanExecuteOnFrame): The check for !frame->IsOutermostMainFrame() when is_web_view is true is too permissive. It should explicitly forbid injection into privileged extension schemes (chrome-extension://), or ensure that the strict cross-extension scripting checks in ExtensionInjectionHost::CanExecuteOnFrame are not bypassed for extension subframes within a guest view.

Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0


Results from 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.

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 two logic errors: the browser-side frame enumeration only checks the parent's origin, so it fails to skip the PDF extension frame, and the renderer-side check allows injection into any subframe when is_web_view is true, bypassing the cross-extension scripting block.

Impact

Successful exploitation could provide full access to the PDF extension's privileged chrome.* APIs, allowing silent modification of camera, microphone, and location settings, enumeration of tabs, and file system writes.

What the attacker needed

Malicious Chrome App or Isolated Web App; webview or controlledframe permission; victim loads a PDF in the app

The fix

The fix should update the browser-side frame enumeration to check the frame's own origin and explicitly forbid injection into privileged extension schemes in the renderer-side check.

How it was found

  1. Create a Platform App with the webview permission (or an Isolated Web App with controlledframe).
  2. In the app, create a <webview> and set its src to a PDF URL, or embed a PDF within a guest page.
  3. Wait for the PDF to load, which creates the extension frame as a subframe in the guest's frame tree.
  4. Call webview.executeScript({code: PAYLOAD, allFrames: true}).
  5. The PAYLOAD should create a Blob containing malicious code and inject it into the DOM via a <script> tag.
  6. Verify that the profile-wide content settings have been modified as intended.

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 Chrome App can ask a webview to run a script in all frames, including a hidden PDF viewer frame that has special permissions. Because of a mistake in how frames are checked, the script can run inside that privileged frame and then use a trick with blob URLs to run code with full extension powers, letting it change browser settings or read files.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.