How My Name Crashed a Welcome Party: SSI to RCE Surprise! with $$
The registration form's first name field was evaluated as a server-side template, so a template expression in the name was executed and its result appeared in the welcome email subject. The author then used a template payload to run a system command and read a local file, which was returned in the email.
Free Link🎈
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 system commands on the server, potentially accessing sensitive data or taking control of the server.
What the attacker needed
A registration form with a name field; the name is used in a template; a welcome email is sent
The fix
User input should be validated and sanitised, and templates should be executed in a sandboxed environment.
How it was found
- Go to the sign-up page and click Register.
- Enter a template expression in the First Name field.
- Complete the rest of the form and submit it.
- Open the welcome email and check the subject for the evaluated result.
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 template engine lets a website fill in placeholders like a name to build pages or emails. Here the site treated the user's name as part of the template itself, so a special expression in the name was calculated by the server. That let the author make the server run a command and send back a file's contents.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.