Skip to content
Threat Feed
high advisory

CVE-2022-22978 Authorization Bypass in Spring Security

An authorization bypass vulnerability in Spring Security allows unauthenticated attackers to access restricted endpoints by injecting URL-encoded newline or carriage return characters into request paths protected by RegexRequestMatcher.

CVE search metadata

CVE search record: CVE-2022-22978. Severity: critical. CVSS: 9.8. EPSS: 12.35%. KEV: no. Product: Spring Security (< 5.5.7, 5.6.4). Brief: CVE-2022-22978 Authorization Bypass in Spring Security. Brief link: https://feed.craftedsignal.io/briefs/2026-09-cve-2022-22978-spring-security/

CVE-2022-22978 is a high-severity security vulnerability in VMware Spring Security that facilitates authorization bypass via improper input validation. When an application uses RegexRequestMatcher with regex patterns containing a dot (e.g., /admin/.*) for path matching, the framework fails to correctly sanitize URL-encoded newline (%0a) or carriage return (%0d) characters.

An attacker can append these encoded control characters to a request path to deceive the matcher, causing it to incorrectly permit access to sensitive administrative or protected resources. This vulnerability affects Spring Security versions prior to 5.5.7 and 5.6.4. The disclosure of functional proof-of-concept payloads on public platforms increases the risk of exploitation against internet-facing applications utilizing affected versions of the framework. Defenders must identify requests containing unauthorized URL-encoded control characters targeting protected URL patterns.

Impact

Successful exploitation of CVE-2022-22978 allows unauthenticated remote attackers to bypass security constraints, potentially leading to unauthorized access, data exfiltration, or administrative action against vulnerable web applications. Given the ubiquitous use of Spring Security in enterprise environments, widespread potential for impact exists across organizations hosting Java-based web services.

Recommendation

  1. Patch all Spring Security instances immediately to versions 5.5.7, 5.6.4, or later to address the underlying validation flaw.
  2. Implement strict input validation on all incoming HTTP requests to strip or reject URL-encoded control characters (0x0A and 0x0D) before they reach the security filter chain.
  3. Deploy the Sigma detection rule below to identify exploitation attempts targeting restricted application paths.
  4. Audit web server logs for HTTP requests containing percent-encoded newline or carriage return characters directed at protected URL patterns defined in RegexRequestMatcher.

Immediate actions

Patch affected Spring Security instances to version 5.5.7 or 5.6.4

IT Operations 48h

Threat Hunt

Search web logs for %0a or %0d within request URIs

T1595 high high confidence hunt now

Data: Webserver access logs

Mitigations

Upgrade Spring Security to version 5.5.7/5.6.4

immediate IT Operations

CVE-2022-22978

Detection coverage 1

Detects CVE-2022-22978 Exploitation - URL-Encoded Control Characters in Request Path

high

Detects potential exploitation of CVE-2022-22978 by identifying URL-encoded newline or carriage return characters in the request path, which are used to bypass RegexRequestMatcher authorization.

sigma tactics: initial_access techniques: T1595 sources: webserver

Detection queries are available on the platform. Get full rules →