Injection Can Be Anywhere
The invoice creation feature did not sanitise input fields, allowing stored blind XSS and HTML injection; the comments feature evaluated template expressions, confirming SSTI. An attacker could execute script in a viewer's browser, redirect users via injected links, and potentially run server-side commands, though command execution was blocked.
medium.com
Published on medium.com
In this write-up, I’d like to share several injection vulnerabilities I discovered during testing — including XSS (Cross-Site Scripting), HTML Injection, and SSTI (Server-Side Template Injection).
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 missing output encoding and input sanitisation on invoice fields and comments, plus unsafe evaluation of user input by a template engine.
Impact
An attacker could run script in the context of users viewing the invoice, redirect them to external sites, and potentially execute server-side commands, though command execution attempts did not produce output.
What the attacker needed
Access to invoice creation feature; victim views the invoice; victim clicks injected link
The fix
Input validation and output encoding should be applied consistently across all user inputs, and template expressions should not be evaluated from user-supplied comments.
How it was found
- Submit an image tag with an error handler that loads an external script into an invoice field.
- Check the webhook listener to see data sent from the rendered invoice.
- Submit an anchor tag linking to an external site in an invoice field.
- Click the injected link to confirm it redirects.
- Submit a template expression in the invoice comments field.
- Observe the comment output showing the calculated 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.
The invoice form and comment box accepted special characters without cleaning them up. When other people viewed the invoice, their browsers treated the text as code, so an attacker could run a script or add a fake link. The comment box also used a template engine, which treated input like a maths problem and calculated it, showing the server was processing the text.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.