PaperCut MF EmailRenderer Server-Side Template Injection Remote Code Execution Vulnerability
The EmailRenderer class in PaperCut MF fails to validate user-supplied strings before passing them to a template engine, allowing an authenticated attacker to inject template code. This could let an attacker execute arbitrary code with SYSTEM privileges, though authentication is required and can be bypassed.
This vulnerability allows remote attackers to execute arbitrary code on affected installations of PaperCut MF. Although authentication is required to exploit this vulnerability, the existing authentication mechanism can be bypassed.
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 report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the EmailRenderer class passed user-controlled input directly into a template engine without sanitising or validating it, enabling server-side template injection.
Impact
An attacker could execute arbitrary code with SYSTEM privileges, but authentication is required and the existing authentication mechanism can be bypassed.
What the attacker needed
Authentication (bypassable); PaperCut MF installation
The fix
PaperCut has issued an update to correct this vulnerability.
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 report has not been written yet. The Original tab links to the source.
A template engine is a tool that fills in placeholders in text to produce output like emails. Here, the software did not check what a user typed before giving it to that tool, so a malicious user could sneak in instructions that the tool would run as code. This could let them run their own programs on the server with high privileges.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.