Bug 308752

Summary: blob: URLs are allowed in <iframe>s when CSP’s `frame-src` contains `‘self’`.
Product: WebKit Reporter: nikosfan
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, bfulgham, k_monsen, roberto_rodriguez2, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Test for reproduction none

nikosfan
Reported 2026-02-26 07:26:09 PST
Created attachment 478498 [details] Test for reproduction Version: WebKitGTK MiniBrowser 2.50.4, 2.47.0 OS: Ubuntu 22.04.3 LTS Description: When `Content-Security-Policy: frame-src ‘self’` is set, an <iframe> whose `src` attribute is a blob: URL is allowed to load. The attached test sets the response header `Content-Security-Policy: frame-src 'self' ` and dynamically creates an <iframe> whose `src` attribute is set to a blob: URL. The embedded document prints the word “run” to the console when it is loaded. Steps to Reproduce: 1) Serve the attached files from an HTTP web server with PHP enabled. 2) Visit self-enables-blob-frame-src.php. 3) Open the browser console and observe whether “run” is printed. Observed Behavior: The <iframe> is loaded and the console prints “run”. Expected Behavior: For <iframe> documents loaded from blob: URLs to be allowed, the blob: scheme should be explicitly listed in the `frame-src` directive. Comparison with other Major Browsers: Chrome, Opera, Brave, Edge, Firefox and Tor block the <iframe> and do not print “run”. Important Notes: - This behavior is observed only for the `frame-src` directive. - This behavior is not observed in the `frame-src` directive’s fallbacks (`child-src` and `default-src`) and `object-src`.
Attachments
Test for reproduction (513 bytes, application/x-php)
2026-02-26 07:26 PST, nikosfan
no flags
Radar WebKit Bug Importer
Comment 1 2026-02-26 07:26:15 PST
Kristian Monsen
Comment 2 2026-03-17 15:39:40 PDT
Minor spec compliance, and not a security issue.
roberto_rodriguez2
Comment 3 2026-03-17 15:54:06 PDT
EWS
Comment 4 2026-03-19 09:46:55 PDT
Committed 309559@main (70534942aada): <https://commits.webkit.org/309559@main> Reviewed commits have been landed. Closing PR #60814 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.