Skip to content
Memory corruption Advisory Advanced CVE-2020-3868

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.

Marcin Towalski Follow

Originally disclosed on Cisco Talos

High 8.8 View original

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.

Marcin Towalski, on Cisco Talos

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.

More by Marcin Towalski

View all

12 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.