Spring Boot 4.0 CVE-2026-40976 — Default Security Misconfiguration Exposes All Actuator Endpoints Unauthenticated

CVE-2026-40976 in Spring Boot 4.0.0 through 4.0.5 allows unauthenticated network access to all Spring Boot Actuator management endpoints when applications rely on the default Spring Security auto-configuration but omit the spring-boot-health dependency. Exposed endpoints include heapdump, env, mappings, and loggers — enough to extract secrets and manipulate application behaviour. Upgrade to Spring Boot 4.0.6 or later.

4 min read
#spring-boot#actuator#cve-2026-40976#auth-bypass#java#enterprise-framework

A security misconfiguration flaw in Spring Boot 4.0 — the latest major release of the most widely used Java application framework in enterprise environments — allows unauthenticated remote attackers to access the full suite of Spring Boot Actuator management endpoints when applications are configured in a common but specific way. CVE-2026-40976, rated CVSS 9.1, affects Spring Boot versions 4.0.0 through 4.0.5 and was patched in the 4.0.6 release published April 28, 2026.

The Vulnerability

Spring Boot’s Actuator module exposes management endpoints (/actuator/*) that provide health monitoring, metrics, heap dumps, environment variable listings, log level control, and configuration mappings for running applications. These endpoints are intended for internal monitoring use and should never be exposed unauthenticated to untrusted networks.

Spring Boot’s auto-configuration is designed to apply default security restrictions to Actuator endpoints when spring-boot-starter-security is on the classpath. However, CVE-2026-40976 exposes a flaw in how this default security is resolved in the 4.0 release series:

When an application includes spring-boot-actuator-autoconfigure but does not include the spring-boot-health dependency (a change in Spring Boot 4.0’s modular structure), the security auto-configuration’s endpoint-to-security-filter mapping fails to apply correctly. The result is that all Actuator endpoints bypass Spring Security’s filter chain entirely, becoming accessible without authentication regardless of any SecurityFilterChain beans defined in the application.

Critically, this failure mode is silent — no warning is logged, and the application starts normally. Developers who migrated from Spring Boot 3.x without explicitly specifying the spring-boot-health dependency (which was previously bundled by default) will encounter this behaviour without indication that security has failed to apply.

Exposed Endpoints and Their Impact

The unauthenticated exposure of Actuator endpoints creates several distinct attack vectors:

EndpointExposure
/actuator/heapdumpDownloads a full JVM heap snapshot — contains in-memory secrets, credentials, session tokens, and application data
/actuator/envLists all environment variables and Spring properties — database passwords, API keys, cloud credentials in plain text
/actuator/loggersAllows changing log levels at runtime — can enable DEBUG logging to capture sensitive data in logs
/actuator/mappingsReveals all application URL mappings — aids targeted exploitation of application-layer vulnerabilities
/actuator/beansLists all Spring beans — reveals application structure and third-party integrations
/actuator/shutdownIf enabled, terminates the application — denial of service

The /actuator/heapdump endpoint is the most immediately dangerous. A heap dump from a running Java application reliably contains plaintext copies of recently used secrets, database connection strings, JWT signing keys, and OAuth client secrets — data that persists in heap until garbage collected.

Affected Configurations

The vulnerability specifically affects:

  • Spring Boot 4.0.0–4.0.5
  • Applications with spring-boot-actuator-autoconfigure on the classpath
  • Applications that do not explicitly include spring-boot-health as a dependency
  • Applications relying on Spring Boot’s default security auto-configuration rather than explicitly securing endpoints

Applications that explicitly define a SecurityFilterChain bean that covers Actuator endpoints, or that use Spring Boot 3.x (which is not affected), are not vulnerable.

Remediation

Preferred: Upgrade to Spring Boot 4.0.6, which corrects the security filter chain resolution logic.

Temporary workaround (if immediate upgrade is not possible):

  • Explicitly add spring-boot-health to your pom.xml or build.gradle dependencies
  • Or explicitly secure Actuator endpoints in a SecurityFilterChain bean: requestMatchers(EndpointRequest.toAnyEndpoint()).authenticated()

Detection: Check whether your Spring Boot 4.0 application exposes Actuator endpoints unauthenticated:

curl -s http://localhost:8080/actuator | jq .

If this returns endpoint listings without an authentication challenge, the application is vulnerable.

Deployment Scope

Spring Boot is the foundation of a significant proportion of enterprise Java microservices and REST API backends. Spring Boot 4.0 was released in late 2025 and has seen rapid adoption given its Java 21 LTS baseline requirement and virtual thread integration. Any organisation that has migrated services to Spring Boot 4.0 in the past six months without explicit security configuration of Actuator endpoints should treat this as an urgent patch priority, particularly for services deployed in environments where internal networks are not considered fully trusted (cloud-native, zero-trust, containerised microservices deployments).

Share this article