Local file read via XSS using PDF generate functionality
A note-taking feature that exported notes to PDF rendered user-supplied HTML without sanitisation, allowing HTML injection. The researcher escalated this to JavaScript execution in the PDF renderer and used it to read local files such as /etc/passwd.
Published on echopwn.com
I’m going to share a story about how I escalated a low severity bug into a critical one.
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 PDF export rendered user-controlled note content as HTML without sanitising it, and the renderer allowed local file access from injected markup.
What the attacker needed
Access to the Collab note feature; ability to export notes as PDF
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.
When a website turns your notes into a PDF, it should treat your text as plain text, not as code. Here it treated the text as HTML, so the researcher could add a script-like instruction that ran inside the PDF generator and read files on the server.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.