Authorization bypass via newline-evading regex match
Published May 19, 2022 · Updated Aug 3, 2024
Authorization bypass in Spring Security before 5.4.11, 5.5.0 through 5.5.6, and 5.6.0 through 5.6.3 allows attackers to access protected resources. RegexRequestMatcher compiled application-supplied patterns without Pattern.DOTALL, so a servlet-decoded CR or LF in the request path made a dot fail to match the complete path. Exploitation requires a dot in a RegexRequestMatcher rule and a servlet container that preserves encoded line breaks, allowing requests to evade the intended authorization rule.
Summary
What happened
Authorization bypass in Spring Security before 5.4.11, 5.5.0 through 5.5.6, and 5.6.0 through 5.6.3 allows attackers to access protected resources. RegexRequestMatcher compiled application-supplied patterns without Pattern.DOTALL, so a servlet-decoded CR or LF in the request path made a dot fail to match the complete path. Exploitation requires a dot in a RegexRequestMatcher rule and a servlet container that preserves encoded line breaks, allowing requests to evade the intended authorization rule.
The record
- CVE
- CVE-2022-22978
- Published
- May 19, 2022
- Updated
- Aug 3, 2024
- Vendor
- Spring
- Product
- Spring Security
- Classifications
- CWE-285, CWE-863, T1190
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- May 19, 2022CVE publishedPublication date reported by the CVE source.
- Aug 3, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=Spring security versions 5.4.x prior to 5.4.11+,5.5.x prior to 5.5.7+,5.6.x prior to 5.6.4+ and all earlier unsupported versions
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- SpringSecurityV1 CVE-2022-22978 proof of conceptproof of concept · unverified
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo