Bug 1541996 - Spring Security: Security bypass with static resources
Summary: Spring Security: Security bypass with static resources
Keywords:
Status: CLOSED DUPLICATE of bug 1540030
Alias: None
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1541997
Blocks: 1542000
TreeView+ depends on / blocked
 
Reported: 2018-02-05 11:38 UTC by Andrej Nemec
Modified: 2021-02-17 00:51 UTC (History)
2 users (show)

Fixed In Version: springframework-security 5.0.3, springframework-security 4.3.14
Clone Of:
Environment:
Last Closed: 2018-02-26 00:19:33 UTC
Embargoed:


Attachments (Terms of Use)

Description Andrej Nemec 2018-02-05 11:38:01 UTC
Spring Security does 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. 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. In this particular attack, different character encodings used in path parameters allows secured Spring MVC static resource URLs to be bypassed.

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 Andrej Nemec 2018-02-05 11:38:25 UTC
Created springframework-security tracking bugs for this issue:

Affects: fedora-all [bug 1541997]

Comment 2 Hooman Broujerdi 2018-02-13 04:23:52 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 Sam Fowler 2018-02-26 00:19:33 UTC
Closing this as a duplicate of 1540030, which originally had CVE-2017-8030 but was rejected in favour of CVE-2018-1199


Note You need to log in before you can comment on or make changes to this bug.