CVE Professor
/
All CVEs
CVE-2026-59414

CVE-2026-59414 — Spring Boot (4.1.2.1) — CWE-22

CRITICAL CVSS 9.1 ⚡ EPSS 0.4% CVE.org

Request matchers created by EndpointRequest and PathRequest may not correctly handle paths with trailing slashes. This may prevent security matching rules from having the intended effect and leave a path unintentionally unsecured.

Request matchers created by EndpointRequest and PathRequest may not correctly handle paths with trailing slashes. This may prevent security matching rules from having the intended effect and leave a path unintentionally unsecured.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability None A:N
EPSS — Exploit Prediction Scoring System
0.4%
30-day probability
In the 41. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a Security Bypass caused by an inconsistency in path normalization between Spring Security’s request matching logic and the underlying servlet container (or Spring MVC routing).

Technical Flaw:
In Spring Boot 4.1.2.1, EndpointRequest and PathRequest matchers (used in SecurityFilterChain configurations to define which URLs require authentication or specific roles) fail to correctly normalize paths with trailing slashes (/).

1. The Mismatch: When a security rule is defined (e.g., http.authorizeHttpRequests(auth -> auth.requestMatchers("/admin/").hasRole("ADMIN"))), the matcher expects a specific path format. However, if an attacker requests /admin/ (with a trailing slash) or /admin// (double slash), the matcher may fail to recognize this as matching the /admin/ pattern.
2. The Bypass: Because the matcher returns false (no match), the security filter chain does not apply the intended authorization check (e.g., hasRole("ADMIN")). Instead, the request falls through to a default rule (often permitAll() or a less restrictive rule), allowing unauthenticated access to protected resources.
3. Root Cause: This is a classic Path Traversal/Normalization Bypass (CWE-22/CWE-73). The security layer and the application layer disagree on what the "canonical" path is. The security layer sees /admin/ as distinct from /admin, while the application layer (Spring MVC) treats them as equivalent.

CVSS Vector Analysis:

  • AV:N/AC:L/PR:N/UI:N: Exploitable remotely over the network with low complexity, no privileges, and no user interaction.

  • C:H/I:H/A:N: High Confidentiality and Integrity impact. An attacker can read sensitive data (C:H) and modify resources (I:H) without authentication. Availability is not directly impacted (A:N) because the service remains up, but data integrity is compromised.
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

    The attacker identifies that the target is running Spring Boot 4.1.2.1. This can be determined via:
  • Response Headers: X-Application-Context or Server headers.
  • Error Pages: Spring Boot’s default error page (/error) often reveals the version in the trace or message field if server.error.include-stacktrace is set to always or on_param_trace.
  • Dependency Scanning: Using tools like nmap with http-enum or whatweb to fingerprint the framework.
  • 2. Exploitation

    The attacker targets a protected endpoint, such as /api/admin/users, which is secured by a rule like:
    http.authorizeHttpRequests(auth -> auth
        .requestMatchers("/api/admin/**").hasRole("ADMIN")
        .anyRequest().permitAll()
    );

    The Bypass:
    The attacker sends a request to the same resource but appends a trailing slash: /api/admin/users/.

    PoC (Illustrative):

    # Normal request (Blocked by Security Filter)
    curl -v http://target.com/api/admin/users
    # Expected: 401 Unauthorized or 403 Forbidden
    
    # Bypassed request (Allowed by Security Filter due to matcher failure)
    curl -v http://target.com/api/admin/users/
    # Expected: 200 OK (Unauthenticated access)

    Why it works:
    1. The PathRequest matcher for /api/admin/** does not match /api/admin/users/ due to the trailing slash handling bug.
    2. The request falls through to .anyRequest().permitAll().
    3. Spring MVC’s DispatcherServlet normalizes /api/admin/users/ to /api/admin/users and routes it to the correct controller.
    4. The controller executes, returning sensitive data to the unauthenticated attacker.

    Variations to Test:

  • /api/admin/users// (Double slash)

  • /api/admin/users/. (Dot suffix)

  • /api/admin/users/%2F (URL-encoded slash)
  • 3. Post-Exploitation

  • Data Exfiltration: The attacker can read all protected resources (e.g., user PII, API keys, internal configs) by appending / to any protected path.
  • Privilege Escalation: If the bypassed endpoint allows state changes (e.g., POST /api/admin/roles), the attacker can modify user roles, create admin accounts, or alter application state without authentication.
  • Lateral Movement: If the exposed data includes internal service credentials or API tokens, the attacker can pivot to other internal systems.
  • 🌍 Real World Impact

  • Confidentiality (High): Unauthenticated access to sensitive endpoints (e.g., /api/v1/users, /api/v1/orders, /actuator/env). This can lead to data breaches, exposure of API keys, and PII leakage.
  • Integrity (High): If the bypassed endpoints accept write operations (POST/PUT/DELETE), an attacker can modify data, create unauthorized accounts, or disable security features.
  • Availability (None): The service remains operational. However, data corruption or unauthorized changes could indirectly impact availability if critical data is tampered with.
  • Practical Consequences:

  • Financial Loss: Exposure of payment data or API keys.

  • Reputational Damage: Data breach disclosure.

  • Regulatory Fines: Violation of GDPR, HIPAA, or PCI-DSS due to unauthorized access to sensitive data.
  • 🛡️ Remediation & Mitigation

    1. Upgrade (Primary Fix)

  • Affected Version: Spring Boot 4.1.2.1
  • Fix: Upgrade to the next patched version of Spring Boot (likely 4.1.2.2 or later, or the next minor release). The fix will ensure that EndpointRequest and PathRequest matchers correctly normalize trailing slashes to match the behavior of Spring MVC’s DispatcherServlet.
  • 2. Workarounds (If Immediate Upgrade is Not Possible)

    A. Normalize Paths in a Filter (Java Code)

    Add a OncePerRequestFilter before the Spring Security filter chain to normalize the request URI. This ensures that the security matcher sees the same path as the MVC layer.
    @Component
    @Order(Ordered.HIGHEST_PRECEDENCE) // Must run before Spring Security
    public class PathNormalizationFilter extends OncePerRequestFilter {
        @Override
        protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
                throws ServletException, IOException {
            String uri = request.getRequestURI();
            // Remove trailing slashes (except for root "/")
            if (uri.length() > 1 && uri.endsWith("/")) {
                uri = uri.substring(0, uri.length() - 1);
            }
            // Also handle double slashes
            while (uri.contains("//")) {
                uri = uri.replace("//", "/");
            }
            // Wrap request to return normalized URI
            HttpServletRequestWrapper wrappedRequest = new HttpServletRequestWrapper(request) {
                @Override
                public String getRequestURI() {
                    return uri;
                }
                @Override
                public String getServletPath() {
                    return uri;
                }
            };
            filterChain.doFilter(wrappedRequest, response);
        }
    }

    B. WAF Rule (ModSecurity)

    Block requests with trailing slashes on protected paths. This is a temporary mitigation and may break legitimate clients if they rely on trailing slashes.
    # ModSecurity Rule: Block trailing slashes on sensitive paths
    SecRule REQUEST_URI "@pm /api/admin/ /api/users/ /actuator/" \
        "id:100001,phase:1,deny,status:403,msg:'Trailing slash bypass attempt',log"

    C. Access Restrictions

    If the application is internal, restrict access to the affected endpoints via network policies (firewall rules) to only trusted IPs.

    3. Detection (IoCs)

    Web Server Logs (Nginx/Apache):
    Look for requests to protected paths with trailing slashes that return 200 OK instead of 401/403.

    # Example Nginx log pattern
    grep "GET /api/admin/users/ HTTP/1.1" access.log | grep " 200 "

    Spring Boot Actuator (if exposed):
    Check /actuator/httptrace for recent requests with trailing slashes.

    SIEM Query (Splunk):

    index=web_logs status=200 (uri="/api/admin/*/" OR uri="/api/users/*/" OR uri="/actuator/*/")

    ⚠️ Urgency

  • CVSS Score: 9.1 (Critical)
  • CISA KEV: No (Not currently listed, but high risk)
  • Exploit Complexity: Low (Simple URL manipulation)
  • Patch Priority: IMMEDIATE
Recommendation: 1. Patch Immediately: Upgrade Spring Boot to the latest patched version. 2. Audit Security Configurations: Review all SecurityFilterChain configurations for reliance on PathRequest or EndpointRequest matchers. 3. Monitor Logs: Check for any unauthorized access to protected endpoints with trailing slashes in the past 30 days. 4. Apply Workaround: If patching is delayed, deploy the PathNormalizationFilter or WAF rule immediately.

Note: This vulnerability is a critical security bypass that can expose entire sections of an application to unauthenticated users. It should be treated as a P0 (Critical) incident.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

body="Whitelabel Error Page"
CVSS Score
9.1 / 10 · CVSS CRITICAL
Weakness Types (CWE)
Affected Products (1)
Spring:Spring Boot (4.1.2.1)
References & Advisories (2)
Related CVEs
6.9
CVE-2026-144417
### Summary The dataset-preview endpoint `POST /jmreport/qurestSql` substitutes request parameters into the d
9.9
CVE-2026-77526
FacturaScripts is an open source accounting and invoicing software. From version 2025 to before version 2026.3
9.8
CVE-2026-145055
PraisonAI pip praisonai before 4.8.0, praisonaiagents and npm praisonai before 1.8.0, and praisonai-bot, prais
9.4
CVE-2026-129109
Calico installations managed by the Tigera Operator install a FlexVolume driver (nodeagent~uds/uds) on every L
9.4
CVE-2026-64883
Path traversal in the WebDAV interface (DotWebdavHelper and the WebDAV temporary-file COPY and MOVE handling)
8.6
CVE-2026-115524
Path traversal in the push-publish bundle receiver (BundlePublisherResource, /api/bundlePublisher/publish) in
8.3
CVE-2026-144679
Thanos through 0.42.5 contains a path traversal vulnerability in Receive that allows unauthenticated remote-wr