Skip to content
RCE Write-up Intermediate

YAFPC — Unauthenticated Remote Code Execution

The YAFPC appliance enforced authentication only in the browser frontend, so the server never checked whether a request was logged in. An unauthenticated attacker could read the admin password and Active Directory service account credentials, and inject shell commands through a print filter to get remote code execution as root.

Luke Paris Follow

Published on blog.paradoxis.nl

Two separate flaws exist in the YAFPC (Yet Another Free PDF Composer) appliance which allows an attacker to gain remote code execution, as well as obtain Active Directory (AD) domain credentials without prior authentication or authorization.

Luke Paris, on blog.paradoxis.nl

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 application relied on a client-side cookie and JavaScript to hide the login screen, with no server-side authorisation checks, and it passed user-supplied print filter values to a shell.

Impact

An unauthenticated attacker could gain remote code execution with full root privileges and obtain Active Directory service account credentials, potentially using the host to reach otherwise inaccessible network segments.

What the attacker needed

Network access to the appliance; no credentials needed

The fix

No official patch is expected because the vendor has ceased operations; the author recommends network restrictions, a WAF blocking the affected form fields, and blocking the exposed pages, though blocking those pages breaks legitimate functionality.

How it was found

  1. Open the application and click the Admin Settings link.
  2. Inspect the HTTP traffic and note the admin password returned without authentication.
  3. Visit the mail alias page to read the Active Directory service account credentials.
  4. Add a custom print filter containing shell commands, base64-encode stdin and stdout, and trigger the print function to get code execution.

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.

The login check only happened in the web page itself, not on the server. Anyone who sent requests directly to the server was treated as logged in, so they could read stored passwords and run their own commands on the machine. This is like a door with a sign saying 'members only' but no actual lock.

What is RCE?

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

More by Luke Paris

View all

2 more disclosed reports, best first.

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.