Bug 1409838 (CVE-2016-9879)

Summary: CVE-2016-9879 Spring Security: Improper handling of path parameters allows bypassing the security constraint
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abhgupta, aileenc, bmcclain, chazlett, dblechte, dmcphers, eedri, java-sig-commits, jialiu, jokerman, lmeyer, lsurette, mgoldboi, michal.skrivanek, mmccomas, puntogil, sbonazzo, srevivo, tiwillia, ykaul
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: springframework-security 3.2.10, springframework-security 4.1.4, springframework-security 4.2.1 Doc Type: If docs needed, set a value
Doc Text:
It was found that Spring Security does not consider URL path parameters when processing security constraints. By adding a URL path parameter with an encoded / to a request an attacker may be able to bypass a security constraint.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1409840    
Bug Blocks: 1409841    

Description Adam Mariš 2017-01-03 15:14:47 UTC
Spring Security does not consider URL path parameters when processing security constraints. By adding a URL path parameter with an encoded "/" to a request, an attacker may be able to bypass a security constraint. The root cause of this issue is a lack of clarity regarding the handling of path parameters in the Servlet Specification (see below). Some Servlet containers include path parameters in the value returned for getPathInfo() and some do not. Spring Security uses the value returned by getPathInfo() as part of the process of mapping requests to security constraints. The unexpected presence of path parameters can cause a constraint to be bypassed.

Users of Apache Tomcat (all current versions) are not affected by this vulnerability since Tomcat follows the guidance previously provided by the Servlet Expert group and strips path parameters from the value returned by getContextPath(), getServletPath() and getPathInfo().

Users of other Servlet containers based on Apache Tomcat may or may not be affected depending on whether or not the handling of path parameters has been modified.

Users of IBM WebSphere Application Server 8.5.x are known to be affected.

Users of other containers that implement the Servlet specification may be affected.

Upstream bug:

https://github.com/spring-projects/spring-security/issues/4169

External Reference:

https://pivotal.io/security/cve-2016-9879


Mitigation:

Use a Servlet container known not to include path parameters in the return values for getServletPath() and getPathInfo()

Comment 1 Adam Mariš 2017-01-03 15:15:34 UTC
Created springframework-security tracking bugs for this issue:

Affects: fedora-all [bug 1409840]

Comment 4 errata-xmlrpc 2017-08-10 23:03:15 UTC
This issue has been addressed in the following products:

  Red Hat JBoss Fuse

Via RHSA-2017:1832 https://access.redhat.com/errata/RHSA-2017:1832

Comment 5 Joshua Padman 2019-08-06 04:31:37 UTC
This vulnerability is out of security support scope for the following product:
 * Red Hat JBoss Fuse 6

Please refer to https://access.redhat.com/support/policy/updates/jboss_notes for more details.