Skip to content
XSS Advisory Advanced CVE-2018-4309

Apple Safari Subframe Same-Origin Policy Bypass Vulnerability

Safari mishandled subframes so that JavaScript could run without keeping the original origin, letting an attacker execute script in the context of a different domain. Exploitation required the victim to visit a malicious page and perform a user gesture.

Anonymous Follow

Originally disclosed on Zero Day Initiative

Medium 6.4 View original

This vulnerability allows remote attackers to bypass the same-origin policy on vulnerable installations of Apple Safari. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file and execute a user gesture within the rendered HTML.

Anonymous, on the Zero Day Initiative

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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 flaw in how Safari assigned or preserved the origin of subframes, allowing script to execute in the context of another domain.

Impact

An attacker could execute script in the context of a different domain, potentially reading or altering that domain's data, though a user gesture was required.

What the attacker needed

Victim uses vulnerable Safari; victim visits malicious page; victim performs a user gesture

The fix

Apple issued an update to correct the vulnerability.

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.

Websites rely on the same-origin policy to stop one site's code from reading or changing another site's data. Here, Safari's handling of embedded frames (subframes) let a malicious page run its script as if it belonged to a different domain, which breaks that protection. The attacker still needed the victim to visit a page and click or otherwise interact with it.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by Anonymous

View all

2,270 more disclosed reports, best first.

More from Zero Day Initiative

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.