Feature Stretching
The invoice preview feature applied its XSS filter only when a valid template id was supplied, so a non-existent template id skipped the filter and reflected the message unsanitised. An attacker could craft a link that runs script in the victim's browser on the Blinksale domain.
medium.com
Published on medium.com
P reviewing is cool. A lot of web sites and services offer a ‘preview before posting’ or ‘preview before buying’ option.
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 input sanitiser was applied inside the template-rendering path, so any code path that skipped a valid template also skipped sanitisation.
Impact
An attacker could run script in a victim's browser on the Blinksale domain via a crafted preview link, though the text does not describe any further consequences.
What the attacker needed
Victim opens a crafted preview link; attacker can set the template id parameter
The fix
The issue was fixed by the vendor after being reported.
How it was found
- Open the invoice preview and note that a newline in the message becomes a line-break tag in a GET parameter.
- Try a script payload in the message and see it blocked with a valid template id.
- Inspect the GET parameters and find one that selects the template id.
- Change the template id to a non-existent value and resubmit the payload.
- Observe the payload reflected and executed in the preview window.
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 website let you preview an invoice message before sending it. Normally it cleaned up dangerous code in your message, but only when it also loaded a known page template. By pointing the preview at a template that did not exist, the cleaning step was skipped and the dangerous code ran in the browser. This is called cross-site scripting: an attacker's code running as if it came from the trusted site.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.