Jetty Utility Servlets ConcatServlet Double Decoding Information Disclosure Vulnerability
The ConcatServlet and WelcomeFilter in Jetty decode a supplied path to check it is not within WEB-INF or META-INF, but then pass the decoded path to RequestDispatcher which decodes again. This double decoding allows a doubly encoded WEB-INF path to bypass the check and retrieve protected files such as web.xml.
github.com
Published on github.com
Requests to the ConcatServlet and WelcomeFilter are able to access protected resources within the WEB-INF directory. For example a request to the ConcatServlet with a URI of /concat?/%2557EB-INF/web.xml can retrieve the web.xml file.
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 servlet and filter decode the path for a security check but then pass the decoded path to RequestDispatcher, which decodes it a second time, so the check and the actual resource resolution disagree.
Impact
An attacker could retrieve protected files such as web.xml, revealing sensitive information about the web application's implementation.
What the attacker needed
Jetty before 9.4.41, 10.0.3 or 11.0.3; ConcatServlet or WelcomeFilter deployed
The fix
Upgrade to Jetty 9.4.41, 10.0.3, 11.0.3 or later, or deploy your own ConcatServlet and WelcomeFilter using the code from the latest version.
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.
Some web servers have special folders like WEB-INF that should never be reachable from the internet. Jetty tried to block access by checking the requested path, but it checked a decoded version while the next step decoded it again, so a cleverly encoded path slipped through. An attacker could then read configuration files that were meant to stay private.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.