HTML Injection on ████
The search and category parameters on a news commentary page were reflected into the HTML without escaping, allowing an attacker to inject arbitrary HTML elements. An attacker could craft a link that renders attacker-controlled content in the victim's browser, potentially damaging the organisation's reputation or triggering GET requests to log the victim out of other services.
bfe3fdb1088411d8ef018aa3abde8 Follow
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 9 months
- Disclosed after 2.9 years
Summary: HTML Injection vulnerabilities on █████████ Air Base Site.
Description: Search value are output without being escaped.
HTML Injection via Category parameter
http://█████████/News/Commentaries?Search=security&Category=%22%3E%3Cimage/src=%22//███████/sealift/2011/July/images/Gumbyleaning2.jpg
Response HTML
<div class="dig_pager">
<a class="dig_pager_button dig_pager_current" href="http://█████████/News/Commentaries/Search/security?Category="><image/src="//████████/sealift/2011/July/images/Gumbyleaning2.jpg"><span>1</span></a>
Impact
- By setting inappropriate contents, the impression of the organization deteriorates.
For example, short URLs that set porn images and graphic images are shared by SNS.
- GET request can be generated from the victim's browser.
For example, there are cases where it is possible to log out a Web service used by the victim.
This discussion is helpful. http://security.stackexchange.com/a/135548
Suggested Remediation Actions
Escape HTML before inserting untrusted data into element content.
Because WAF is running on this site, I could not do XSS. However, since WAF may be bypassed, I recommend HTML escaping.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could inject HTML to display inappropriate content or cause the victim's browser to make GET requests, such as logging them out of another service; the site's WAF prevented full cross-site scripting in this case.
What the attacker needed
Victim clicks a crafted link
The fix
The application should HTML-escape untrusted data before inserting it into element content.
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 report has not been written yet. The Original tab links to the source.
When a website takes what you type into a search box and puts it straight back into the page without cleaning it, an attacker can type HTML code instead of normal text. The browser then treats that code as part of the page, so the attacker can add images or links that were never meant to be there. This is called HTML injection; it is similar to cross-site scripting but usually cannot run JavaScript.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.