Skip to content
RCE Write-up Advanced

From XSS to RCE (dompdf 0day)

dompdf, a PHP library for rendering PDFs from HTML, has an unpatched vulnerability that allowed RCE via a reflected XSS entry point.

positive_sec Follow

Published on positive.security

During a client engagement last year, we were faced with a website that seemed fairly impenetrable at first glance, due to its largely static nature:

Positive Security (@positive_sec), on positive.security

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

Impact

An attacker could execute arbitrary PHP code on the server via a reflected XSS entry point.

What the attacker needed

Reflected XSS entry point

The fix

There is no patch yet; the text does not specify mitigations.

How it was found

  1. Find a reflected XSS vulnerability as the entry point.

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.

dompdf turns HTML into PDFs on a server. An unpatched flaw let attackers achieve RCE using only a reflected XSS as the entry point.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.