Proof of Concept for “Apache Httpd Limited cross-site scripting in mod_proxy error page (CVE-2019-10092)”
The Apache mod_proxy error page included the request URI unescaped inside an anchor tag, so a crafted request could make the link point to an attacker-chosen site. An attacker could cause a victim who clicks the link to be redirected to a malicious page.
0day.work
Published on 0day.work
A few days ago, I came across the Apache Httpd Security Page and read about a XSS issue in modproxy. I couldn’t find a Proof-of-Concept right away, so I dug into it and finally managed to exploit it.
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
Root cause
The request URI was inserted into the href attribute of an anchor tag without escaping, allowing a crafted URI to alter the link destination.
Impact
A victim who clicks the manipulated link on the proxy error page could be redirected to an attacker-controlled site; the issue is limited to servers where the proxy error page is displayed.
What the attacker needed
Apache with mod_proxy enabled; Proxy error page is displayed; Victim clicks the link
The fix
The fix removed the request URI from the proxy error page message, so the link is no longer generated.
How it was found
- Configure Apache with mod_proxy to proxy requests to a backend that will fail (e.g. a non-responsive socket).
- Send a request with a URI containing a vertical tab followed by a protocol-relative URL.
- The proxy error page is displayed with a link whose destination is the attacker-chosen URL.
- A victim clicks the link and is redirected to the attacker's site.
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 proxy fails, Apache shows an error page with a link back to the requested address. The address was placed into the link without proper cleaning, so a specially crafted address could make the link go somewhere else. If a user clicks that link, they end up on a site the attacker controls.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.