User-Controlled External Link Injection in Generated PDF
The PDF export feature accepted an external URL in place of the numeric user ID and embedded it as a clickable link in the generated company-branded PDF. An attacker could use this to create a trusted-looking document that redirects victims to a malicious site for phishing.
medium.com
Published on medium.com
While browsing the platform, I noticed a feature that allows exporting user data as a PDF. Clicking the export button instantly generated and downloaded a company-branded PDF.
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 server did not validate that the userid parameter was numeric before using it to build the PDF content.
Impact
An attacker could generate an official-looking PDF containing a link to a malicious site, which could be used for phishing; the report notes no direct data access or XSS occurs on the platform itself.
What the attacker needed
Access to the PDF export feature; ability to intercept and modify the request
The fix
The server should validate that the userid parameter is numeric and reject any non-numeric input before generating the PDF.
How it was found
- Intercept the request that generates the PDF export.
- Replace the numeric userid value with an external URL.
- Send the request and download the generated PDF.
- Open the PDF and click the embedded link to confirm it redirects to the external site.
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.
A PDF export feature normally takes a user ID number to decide whose data to include. Here the server also accepted a web address instead of a number and put it into the PDF as a clickable link. Because the PDF looks official, a victim might click the link and be taken to a scam website.
What is Open redirect?
A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.