Skip to content
RCE Write-up Intermediate

How i found ssti injection (Server-side template injection)on yeswehack platform in public program

The registration page reflected an HTML injection payload that did not execute there, but the same input was later rendered inside an email sent to the user, making it stored HTML injection. The author then found that certain payloads triggered server-side template injection through the email processing mechanism.

ravindrajatav0709 Follow

Published on medium.com

How i found ssti injection (Server-side template injection)on yeswehack platform in public program

Ravindra, 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 email template rendered user-supplied registration input without escaping, and the email processing path evaluated template syntax in that input.

Impact

An attacker could inject HTML into emails sent to users and, with certain payloads, achieve server-side template injection, which the program rated medium severity.

What the attacker needed

A public bug bounty program; access to the registration page; an email address to receive the message

How it was found

  1. Pick a public program and focus on its registration page.
  2. Test SQL injection, XSS and JavaScript bugs on the registration form.
  3. Try various SSTI payloads on the registration page; one is reflected but not executed.
  4. Wait for the application's email and observe that the earlier HTML injection payload executes in the email content.
  5. Test further payloads and find ones that trigger SSTI through the email processing.

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 is a page skeleton that a server fills in with data before sending it out. Server-side template injection means the server treats user input as part of that template code, so the input can run logic instead of just being displayed. Here the input was harmless on the sign-up page but was rendered unsafely inside a confirmation email.

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 ravindrajatav0709

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.