Fix stored XSS in HTML report via unescaped Location: header (#3090)

pr_url() and pr_boldurl() interpolated their argument directly into
<a href="$1">$1</a> without HTML escaping. The most notable caller
passes the raw HTTP Location: header from the scanned server, so a
malicious HTTPS target could inject arbitrary HTML/JS into an
operator's --htmlfile report. Route both the href attribute and the
link text through the existing html_reserved() escaper, matching the
pattern already used by every other pr_* HTML-output function.
This commit is contained in:
Eric Gu
2026-07-11 22:32:49 -04:00
parent 21bf1ff19f
commit aad4894f77
3 changed files with 6 additions and 2 deletions
+1
View File
@@ -13,6 +13,7 @@
* Enable IPv6 automagically, i.e. if target via IPv6 is reachable just (also) scan it
* Detect and show DNS HTTPS RR (RFC 9460)
* Provide an FAQ
* Security fix: HTML-escape URLs in the HTML report to prevent stored XSS from a server-controlled `Location:` header (#3090)
### Features implemented / improvements in 3.2