Advanced Client Side Injection Secrets Leads To (SSRF , Prev Esc)
The author describes several client-side injection issues found while hunting: HTML injection in a search field that led to an outbound request to an attacker-controlled server, prototype pollution that changed an account role to admin, stored script execution through an uploaded SVG profile picture that redirected visitors, and postMessage handling without origin checks that allowed script execution in the target page. A final section explains a CSS-injection keylogger concept that recovers typed card digits one character at a time.
medium.com
Published on medium.com
To understand Client-Side Injection, think about how websites work in the browser The browser builds the page using objects and elements that can be modified dynamically with JavaScript
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 application inserted user-controlled input into the page, into JavaScript objects, or into message handlers without validating or sanitising it, and trusted message senders without checking their origin.
Impact
An attacker could make an administrator's browser send page content to an attacker server, raise their own account role to admin, redirect anyone viewing a profile to an arbitrary site, and run script in the target origin through postMessage; the CSS keylogger section claims full card numbers could be recovered digit by digit.
What the attacker needed
Attacker-controlled server or Collaborator; victim opens the page or email; ability to upload a profile picture; victim visits the attacker page
How it was found
- Inject simple HTML tags into the search bar and observe that the filter removes them.
- Try other tags and styling to get the injected markup to render.
- Inject an image tag whose source points to a Burp Collaborator domain, leaving the tag unclosed so following page content is appended to the URL.
- Have the administrator open the page or email so the image loads and the request reaches the attacker server.
- Send a custom header and JSON body to test whether keys are reflected and whether the prototype is polluted.
- Upload an SVG containing a script as a profile picture and visit the profile to trigger the redirect.
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 web page is built from objects the browser can change while you use it. If a site puts something a user typed into the page without cleaning it, an attacker can slip in their own instructions, such as a small script or an image that quietly contacts the attacker's server. The author shows several such slips, including one where a profile picture file ran code and one where two browser windows talked to each other without checking who was listening.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.