Apple Safari FontFaceSet Remote Code Execution Vulnerability
A type confusion in Safari's FontFaceSet handling of CSS keywords like 'inherit', 'unset' and 'initial' causes memory corruption. An attacker could craft a malicious HTML page that, when processed, may lead to arbitrary code execution.
Originally disclosed on Cisco Talos
A type confusion vulnerability exists in the Fonts feature of Apple Safari version 13.0.3. A specially crafted HTML web page can cause a type confusion, resulting in memory corruption and possibly arbitrary code execution.
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, the CSS font description parser returns an unexpected object type for keywords like 'inherit', 'unset' and 'initial', which is then incorrectly cast to CSSFontStyleValue, causing a wild memory access.
Impact
A malicious web page could cause memory corruption and possibly arbitrary code execution, though the report only confirms crashes and does not demonstrate full code execution.
What the attacker needed
Victim opens a malicious HTML page; Safari version 13.0.3 or similar
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 type confusion happens when a program treats one kind of data as another, leading to unexpected behaviour. In this case, Safari's font-loading code misinterprets certain CSS keywords, causing it to access memory incorrectly. This could let an attacker run their own code on a victim's computer if the victim opens a malicious web page.
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.