Bug 1540030 (CVE-2018-1199)

Summary: CVE-2018-1199 spring-framework: Improper URL path validation allows for bypassing of security checks on static resources
Product: [Other] Security Response Reporter: Sam Fowler <sfowler>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: ahardin, aileenc, alazarot, anstephe, apevec, bleanhar, bmaxwell, ccoleman, cdewolf, chazlett, chrisw, csutherl, darran.lofthouse, dedgar, dffrench, dimitris, dosoudil, drieden, drusso, etirelli, gvarsami, gzaronik, ibek, java-maint, java-sig-commits, jawilson, jclere, jcoleman, jgoulding, jjoyce, jmadigan, jokerman, jolee, jondruse, jschatte, jschluet, jshepherd, jstastny, kverlaen, ldimaggi, lef, lgao, lgriffin, lhh, lpeer, markmc, mbabacek, mburns, mchappel, mkolesni, myarboro, ngough, nwallace, ppalaga, pslavice, psotirop, puntogil, pwright, rbryant, rnetuka, rrajasek, rstancel, rsvoboda, rsynek, rwagner, rzhang, sclewis, sdaley, sisharma, slinaber, tcunning, tdecacqu, tkirby, trepel, twalsh, vtunka, weli
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: springframework 5.0.3, springframework 4.3.14, springframework-security 5.0.1, springframework-security 4.2.4, springframework-security 4.1.5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-21 19:54:02 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: 1540032, 1540033, 1571049    
Bug Blocks: 1540036    

Description Sam Fowler 2018-01-30 06:32:18 UTC
Spring Framework and Spring Security do not consider URL path parameters when processing security constraints. By adding a URL path parameter with special encodings, an attacker may be able to bypass a security constraint and access Spring MVC static resource URLs.

Affected versions include:
    * Spring Security 4.1.0 - 4.1.4, 4.2.0 - 4.2.3 and 5.0
    * Spring Framework 4.3.0 - 4.3.14, and 5.0.0 - 5.0.2

Older unmaintained versions of Spring Security and Spring Framework may also be affected.


External References:

https://pivotal.io/security/cve-2018-1199

Mitigation:

As a general precaution, users are encouraged to separate public and private resources. For example, separating static resources and mapping them to /resources/public/** and /resources/private/** is preferred to having one common root with mixed public and private resource content underneath.

Comment 1 Sam Fowler 2018-01-30 06:32:58 UTC
Created springframework tracking bugs for this issue:

Affects: fedora-all [bug 1540033]


Created springframework-security tracking bugs for this issue:

Affects: fedora-all [bug 1540032]

Comment 2 Hooman Broujerdi 2018-02-13 04:32:34 UTC
Jetty container in JBoss Fuse complies with servlet specification and does not return path parameters which is a root cause of this flaw, so JBoss Fuse is not affected.

Comment 3 Tomas Hoger 2018-02-26 08:37:26 UTC
*** Bug 1541996 has been marked as a duplicate of this bug. ***

Comment 5 Summer Long 2018-03-08 22:03:20 UTC
For RH OpenStack Platform: Although the spring code contains the flaw, OpenDaylight uses Tomcat which is not vulnerable. "Tomcat follows the guidance previously provided by the Servlet Expert group and strips path parameters from the value returned by getContextPath(), getServletPath() and getPathInfo() [1]."
[1] https://www.securityfocus.com/archive/1/archive/1/514517/100/0/threaded <-- 2010.
catalina-7.0.27.1 used in ODL is from 2012 after the fixes. Should be ok.

Comment 12 Jason Shepherd 2018-06-14 04:32:16 UTC
Spring Security is not used in Millicore component of RHMAP.

Comment 13 errata-xmlrpc 2018-08-14 19:51:12 UTC
This issue has been addressed in the following products:

  Red Hat Fuse Intergration Services 2.0 based on Fuse 6.3 R7

Via RHSA-2018:2405 https://access.redhat.com/errata/RHSA-2018:2405