Spring Boot bypasses default security (CVE-2026-40976)
CVE-2026-40976
CVE-2026-40976: Spring Boot 4.0.0–4.0.5 default security filter chain bypass grants unauthenticated access to all endpoints, including actuators. Update to 4.0.6.
Patch now - CVE-2026-40976 is a critical default security bypass in Spring Boot 4.0.0 through 4.0.5 that grants unauthenticated access to all web endpoints, including sensitive actuator endpoints. Patched in version 4.0.6; update immediately.
Overview
CVE-2026-40976 (CVSS 9.1, CRITICAL) affects servlet-based Spring Boot web applications that rely entirely on the default auto-configured security filter chain and depend on the spring-boot-actuator-autoconfigure module. When spring-boot-health is not present on the classpath and the application has no custom Spring Security configuration, the default web security becomes ineffective. An unauthenticated attacker can reach every endpoint, including actuator endpoints that may expose sensitive application internals, environment variables, or enable dangerous operations such as shutdown or heap dumps.
The vulnerability arises because the default security filter chain in affected versions of Spring Boot does not properly enforce authentication when the actuator autoconfiguration module is loaded but the health endpoint module is absent. This creates a mismatch in the security filter chain assembly, leaving all paths unprotected.
Impact
An attacker with network access to a vulnerable application can:
- Access all actuator endpoints without authentication
- Read environment variables, configuration properties, and application secrets
- Trigger operations like shutdown, heap dump, or thread dump via actuator endpoints
- Indirectly pivot to further compromise of the application or its underlying infrastructure
While the attacker cannot execute arbitrary code directly, the information disclosure from actuator endpoints often provides the credentials, API keys, or infrastructure details needed to escalate to RCE or lateral movement. Public data breach reports frequently trace the initial foothold to unprotected actuator endpoints.
Remediation
Upgrade Spring Boot: The vendor has fixed this issue in version 4.0.6. All users running 4.0.0 through 4.0.5 should upgrade immediately. For environments where upgrading is not immediately possible, apply one or more of these mitigations:
- Add
spring-boot-healthto your project dependencies. This module’s presence prevents the vulnerability trigger condition. - Add explicit Spring Security configuration (even an empty
@EnableWebSecurityannotated class) to override the default security filter chain. - Deploy a reverse proxy or API gateway that enforces authentication before requests reach the Spring Boot application.
- Restrict network access to the application to trusted IP ranges only.
Note that mitigation (1) is not a comprehensive security measure - it simply avoids the vulnerable code path. Full mitigation requires upgrading to 4.0.6 or applying explicit security configuration.
Security Insight
This vulnerability represents a recurring class of issue in auto-configuration frameworks: the interaction of two optional modules creating an unexpected security gap. Unlike a traditional code-level bug, this was a filter chain assembly logic error that left authentication enforcement unloaded. It mirrors historical issues in Spring Security auto-configuration where the presence or absence of certain dependencies silently changed the security posture. The lesson for development teams is that relying on framework defaults without explicit verification creates invisible attack surface, and dependency management decisions can have direct security implications that no amount of code review can catch.
Further Reading
Never miss a critical vulnerability
Get real-time security alerts delivered to your preferred platform.
Related Advisories
WordPress TheCartPress 1.5.3.6 contains an unauthenticated privilege escalation vulnerability that allows attackers to create administrator accounts by submitting crafted requests to the AJAX handler....
Genealogy is a family tree PHP application. Prior to 5.9.1, a critical broken access control vulnerability in the genealogy application allows any authenticated user to transfer ownership of arbitrary...
Dgraph is an open source distributed GraphQL database. Prior to 25.3.1, the restoreTenant admin mutation is missing from the authorization middleware config (admin.go), making it completely unauthenti...
Vito is a self-hosted web application that helps manage servers and deploy PHP applications into production servers. Prior to version 3.20.3, a missing authorization check in workflow site-creation ac...