All is XSS that comes to the .NET
ASP.NET's ResolveUrl method includes cookieless session identifiers from the URL in the resolved path, allowing an attacker to inject characters that break out of an HTML attribute and execute JavaScript. An attacker could craft a URL that triggers reflected XSS when a victim visits it.
blog.isec.pl
Published on blog.isec.pl
The ability to easily add own resources (like .css or .js) to a project is very important feature of many frameworks. Manual updates of sub-pages to insert correct relative paths (remembering how many '../' should be added to match the directory hierarchy) can really be a nightmare.
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 arbitrary JavaScript in a victim's browser, potentially stealing session data or performing actions on behalf of the user.
What the attacker needed
Victim clicks a crafted link; application uses ResolveUrl with cookieless sessions
How it was found
- Place a cookieless session identifier containing a double quote and an event handler in the URL path.
- Access the page that uses ResolveUrl to include a script tag.
- The injected characters break out of the src attribute and execute JavaScript.
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.
When a website builds a link to a file, it sometimes copies part of the web address into the page. If an attacker can control that part, they can sneak in code that runs in the victim's browser. This is called cross-site scripting (XSS).
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.