Bug 1597418 (CVE-2018-12536)

Summary: CVE-2018-12536 jetty: full server path revealed when using the default Error Handling
Product: [Other] Security Response Reporter: Laura Pardo <lpardo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: abergmann, bkearney, hhorak, java-maint, java-sig-commits, jjohnstn, jorton, krzysztof.daniel, meissner, mizdebsk, sochotni, tlestach, vondruch
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: jetty 9.3.24.v20180605, jetty 9.4.11.v20180605 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-27 10:54:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1597419    
Bug Blocks: 1597422    

Description Laura Pardo 2018-07-02 21:59:06 UTC
A flaw was found in Eclipse Jetty Server, all 9.x versions. On webapps deployed using default Error Handling, when an intentionally bad query arrives that doesn't match a dynamic url-pattern, and is eventually handled by the DefaultServlet's static file serving, the bad characters can trigger a java.nio.file.InvalidPathException which includes the full path to the base resource directory that the DefaultServlet and/or webapp is using. If this InvalidPathException is then handled by the default Error Handler, the InvalidPathException message is included in the error response, revealing the full server path to the requesting system.


References:
http://www.securitytracker.com/id/1041194 	
https://bugs.eclipse.org/bugs/show_bug.cgi?id=535670

Comment 1 Laura Pardo 2018-07-02 22:00:23 UTC
Created jetty tracking bugs for this issue:

Affects: fedora-all [bug 1597419]

Comment 3 Doran Moppert 2018-09-20 06:34:13 UTC
Mitigation:

Information disclosure occurs when java.nio.file.InvalidPathException occurs and is handled by the default Jetty error handler. To protect against this, a custom error handler can be configured for that particular error or for a larger set of errors according to the documentation link below. Red Hat Product Security advises that production deployments on Jetty use custom error handlers to limit the information disclosed and to ensure effective logging of error conditions.

http://www.eclipse.org/jetty/documentation/current/custom-error-pages.html