CVE-2026-40982: Critical Spring Cloud Config Server Directory Traversal (CVSS 9.8)
A pre-auth path traversal in spring-cloud-config-server lets unauthenticated attackers read arbitrary files on the host. Affects 3.1.x through 5.0.x, with no upstream fix for EOL branches.
.png)
Disclosed on May 6, 2026 by the Spring security team, CVE-2026-40982 is a Critical directory traversal vulnerability in spring-cloud-config-server. The CVSS 3.1 base score is 9.8, vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N. An unauthenticated attacker can send a specially crafted HTTP request to a running Config Server and read or write arbitrary files accessible to the server process. Spring Cloud Config 3.1.x, 4.1.x, 4.2.x, 4.3.x, 5.0.x, and all older unsupported versions are affected. The upstream OSS fix is available in 4.3.3 and 5.0.3; patches for 3.1.x, 4.1.x, and 4.2.x are available through HeroDevs NES for Spring.
What is CVE-2026-40982?
CVE-2026-40982 is a path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory) in the spring-cloud-config-server module. Spring Cloud Config is a widely deployed component that provides centralized, externalized configuration for distributed systems. The Config Server serves configuration files, text, and binary resources to client microservices over HTTP.
The vulnerability is due to the way the Config Server processes URL path segments when serving resource files. Vulnerable versions fail to fully validate the request segments that are used to locate a file on disk before they are concatenated onto a configured search-location and resolved. A crafted request can therefore cause the server to resolve and return a file outside the intended configuration root. Application firewall rules tuned for traditional path-traversal patterns may not be sufficient.
The Config Server's resource endpoints are read-only, so the direct impact is information disclosure: leaking secrets, credentials, or any other file readable by the server process. In typical Spring Cloud deployments, where the Config Server centralizes secrets for an entire fleet of microservices, that disclosure can cascade to broader compromise.
This is not the first time this module has carried a traversal vulnerability. CVE-2026-22739, disclosed in March 2026, was a related path equivalence flaw in Spring Cloud Config Server enabling file reads and SSRF via the profile parameter. Earlier still, CVE-2019-3799 and CVE-2020-5410 were traversal issues in pre-3.x versions of the same module. Patching CVE-2026-22739 does not protect against CVE-2026-40982: they exploit different handling paths.
Severity and exploit conditions
The Spring advisory links to the following CVSS 3.1 vector: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N, base score 9.8 (Critical).
The exploit preconditions are minimal:
- A spring-cloud-config-server instance is network-reachable on any affected version (3.1.x through 5.0.x, plus older EOL versions).
- The server process has read access to files outside the configuration root, which is the default on most deployments.
- No authentication is required (PR:N). The vulnerability is pre-auth and requires no existing foothold in the target environment.
Config Server instances are sometimes deployed on internal networks under the assumption that internal reachability is adequate security. That assumption does not hold against insiders, compromised microservice clients, or lateral movement from a breached adjacent service. The zero-authentication requirement and low complexity make this trivially scriptable.
What an attacker can do
Successful exploitation gives the attacker file-level read access to paths on the host, subject to the server process's filesystem permissions.
The vulnerability allows reading arbitrary files that the Config Server process can access. The actual impact depends on:
- What files the server process has permission to read
- What sensitive data exists on the filesystem
- The specific deployment and security configuration
Without additional reconnaissance or testing of a specific deployment, the scope of accessible data cannot be determined. Impact assessment would require understanding the server's filesystem permissions and what sensitive files, if any, are present and readable.
Who is affected?
Every Spring Cloud Config version from 3.1.x through 5.0.x is affected, along with all older unsupported versions. The Spring advisory explicitly states that "older, unsupported versions are also affected." Fix availability varies significantly by branch.
Spring Cloud Config's version numbers track Spring Boot generations. The 3.1.x branch aligns with Spring Boot 3.1, which reached EOL in December 2023. The 4.1.x branch aligns with Spring Boot 3.3, EOL June 2025. The 4.2.x branch aligns with Spring Boot 3.4, EOL December 2025. If your Spring Boot version is EOL, the corresponding Spring Cloud Config branch is also EOL, and the community will not issue security patches for it.
Mitigation guidance
Related CVEs
CVE-2026-40982 was disclosed in the same May 6, 2026 advisory batch as three other Spring Cloud Config vulnerabilities. CVE-2026-40981 is a High-severity (CVSS 7.5, AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) flaw in the Google Secrets Manager backend: a crafted client request can expose secrets from unintended GCP projects. The same version ranges are affected and the same fix versions apply. If you are running a Google Secrets Manager-backed Config Server, both CVEs warrant remediation in the same patching window. CVE-2026-41002, also from the same batch, is a separate (TOCTOU) flaw in Config Server local filesystem operations.
CVE-2026-22739, disclosed in March 2026, was a related path equivalence flaw in Spring Cloud Config Server enabling directory traversal and SSRF via the profile parameter. Patching that CVE does not protect against CVE-2026-40982: they exploit different handling paths in the same module. If you patched CVE-2026-22739 but have not yet applied the May 2026 fixes, your Config Server remains exposed.
For the broader set of Spring ecosystem CVEs from the March 2026 disclosure batch, see the March 2026 Spring CVE Roundup, which covers six vulnerabilities across Spring Boot, Spring Security, Spring Framework, and Spring Cloud Config.
Taking action
CVE-2026-40982 is pre-authentication, low-complexity, remotely exploitable, and scored 9.8 Critical. It requires no credentials and no victim interaction. Any organization running Spring Cloud Config where the server is reachable by untrusted traffic, or where the server process has access to sensitive filesystem paths, should treat this as an urgent patch.
The version map complicates remediation. Only two branches have OSS-available fixes: 4.3.3 and 5.0.3. Older versions have no open source upstream fix.
If your organization is running Spring Cloud Config on any EOL branch, NES for Spring delivers a patched, drop-in replacement covering CVE-2026-40982 and the full backlog of unresolved vulnerabilities across the EOL Spring portfolio. No migration required.


