Skip to content
Info disclosure Write-up Intermediate

PDF That Steals Data - The DocDrop Exploit

A PDF file uploaded to a website could contain embedded JavaScript that, when opened in Chrome's built-in PDF viewer, automatically sends the viewer's IP address, User-Agent and other HTTP headers to an attacker-controlled server. The attacker could use this information for targeted social engineering.

medium.com

Published on medium.com

A malicious PDF embeds an invisible 1×1‑pixel image within itself whose source is a remote URL. When any PDF viewer or browser opens the document, it automatically fetches that invisible image that leaks the viewer’s IP address, User‑Agent (OS/browser) and other HTTP headers to the attacker’s server.

Jerry Shah (Jerry), on medium.com

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 inspect or sanitise uploaded PDFs, allowing embedded JavaScript that Chrome's PDF viewer executes to make outbound requests.

Impact

An attacker could learn the IP addresses and User-Agent strings of users who open the PDF, which may help craft targeted social-engineering attacks; the exploit only worked in Chrome.

What the attacker needed

Ability to upload PDFs; victim opens the PDF in Chrome; victim clicks text in the PDF

The fix

The report recommends disabling remote resource loading in PDF previewers, sanitising uploaded PDFs server-side to remove external references, and enforcing a Content Security Policy for PDF rendering.

How it was found

  1. Upload a PDF containing embedded JavaScript that loads a tracking pixel from an attacker-controlled URL.
  2. Create a tracking pixel link using an external service.
  3. Insert the tracking link into the PDF's JavaScript code.
  4. Upload the PDF to the website's attachment feature.
  5. Log in as another user and open the uploaded PDF.
  6. Click the text in the PDF to trigger the data logging.

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 file can contain hidden instructions that make the viewer load a tiny invisible image from a website the attacker controls. When the victim opens the PDF, their browser automatically requests that image, and the request includes details like their IP address and browser type, which the attacker can see. This only worked in Chrome because other browsers block such instructions by default.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.