ZeroSSL: XSS to session hijacking, stealing a private key (and password hash)
A cross-site scripting flaw existed in the ZeroSSL web app, and because the app stores an encrypted private key plus its decryption material in the browser, script running in the app's context could steal the key, the session and a password hash. An attacker could take these over by getting a logged-in user to click a crafted link.
groups.google.com
Published on groups.google.com
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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 app rendered untrusted input without proper escaping, and separately kept the private key's decryption material in browser storage where any script in the page could read it.
Impact
An attacker could hijack a logged-in session, steal a certificate private key that ZeroSSL generated, and steal a password hash, but only if the targeted user had an active session when clicking the malicious link.
What the attacker needed
Victim has an active ZeroSSL session; victim clicks a crafted link; ZeroSSL generated the private key
The fix
The XSS was fixed the same day it was reported, and ZeroSSL said further hardening of the web app was scheduled.
How it was found
- Send the victim a crafted link containing the script.
- The victim, logged in to ZeroSSL, clicks the link.
- The script runs in the app's context and reads the stored decryption material.
- The script uses it to decrypt and exfiltrate the private key.
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.
Cross-site scripting (XSS) is when a website lets an attacker's JavaScript run as if it were the site's own code. Because the ZeroSSL app keeps a user's encrypted certificate key and the material to unlock it inside the browser, that injected script could read and send them elsewhere. The attacker only needed the victim to click a link while logged in.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.