GSA Bounty · Report #263226
HTML injection (with XSS possible) on the https://www.data.gov/issue/ using media_url attribute
Summary
Thanks to the 18F team for the great experience, fast fix, and the bounty!
This XSS was undetectable by the most XSS scanners due to WAF in place. I noticed the reflection upon exploring the huge list of URLs (grabbed from the Google Search) manually. The WAF bypassing was an actual pain - it blocked almost all (but not all!) useful things (tags, events, etc.). There were 3 endpoints in total, affected by this issue.
References
Thanks to the @brutelogic and his awesome filter and WAF evasion tips on the @brutalsecrets - one of those tips helped me to bypass the Kona WAF after 6 hrs of pain.
You may notice, that I even used the brute tag in the payload:)
How it was found
Description
Hello. I discovered Cross-Site scripting issue on the https://www.data.gov/issue/ endpoint.
Akamai WAF and bypass
At the srart i was not able to do the XSS due to Akamai Waf XSS filters, but later, i was able to bypass it.
POC (HTML injection)
POC (Reflected XSS)
Use this link in the Mozilla Firefox https://www.data.gov/issue/?media_url=catalog.data.gov/dataset/consumer-complaint-database%22%3E%3C/div%3E%3C/div%3E%3Cbrute%20onbeforescriptexecute=%27confirm(document.domain)%27%3E {F215768}
Suggested fix
Sanitize all input fields on this page.