Data Exfiltration via CSS + SVG Font
A technique using inline SVG fonts and CSS allows reading a page's text content even when CSP blocks font loading. An attacker could exfiltrate secrets from a page by causing the browser to make background image requests that reveal characters one by one.
This post will show that the SVG fonts and CSS can be used for reading the page's text contents.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the browser allows inline SVG fonts to be used even when CSP's font-src directive is set to 'none', because the font is not loaded from a URL.
Impact
An attacker could read text content from a page, including secrets, even when CSP blocks font loading, but the attack requires Safari and the img-src directive must allow the observing host.
What the attacker needed
Safari browser; CSP allows img-src to attacker host; Victim clicks a link or button
How it was found
- Open the PoC URL in Safari.
- Click the 'Go' button.
- Multiple new windows open and the secret string is displayed little by little.
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 write-up has not been written yet. The Original tab links to the source.
This is about a way to steal text from a web page using only CSS and a special font format called SVG font. Normally, a security rule called Content Security Policy (CSP) can stop fonts from loading, but this trick puts the font directly inside the page so it still works. The attacker makes the browser request images that reveal one character at a time, slowly leaking a secret.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.