Brief Summary: CVE-2026-40982 Directory Traversal in Spring Cloud Config Server

A short review of CVE-2026-40982, a critical directory traversal vulnerability in Spring Cloud Config Server that allows unauthenticated attackers to read arbitrary files via crafted URLs. Covers technical details, affected versions, and remediation guidance.

CVE Analysis

6 min read

ZeroPath CVE Analysis
ZeroPath CVE Analysis

2026-05-06

Brief Summary: CVE-2026-40982 Directory Traversal in Spring Cloud Config Server
Experimental AI-Generated Content

This CVE analysis is an experimental publication that is completely AI-generated. The content may contain errors or inaccuracies and is subject to change as more information becomes available. We are continuously refining our process.

If you have feedback, questions, or notice any errors, please reach out to us.

[email protected]

Introduction

A directory traversal flaw in Spring Cloud Config Server allows unauthenticated attackers to read arbitrary files from the underlying host by sending a single crafted HTTP request. Given that Spring Cloud Config typically serves as the centralized configuration backbone for distributed microservice architectures, successful exploitation could expose database credentials, API keys, and internal service configurations across an entire deployment.

Technical Information

CVE-2026-40982 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly referred to as Path Traversal. The vulnerability resides in the spring-cloud-config-server module, which is designed to serve arbitrary text and binary files to client applications. When serving binary files, the server expects an Accept header of application/octet-stream and can interact with multiple backend types including Git, SVN, and native file systems.

Root Cause

The core issue is insufficient sanitization of file paths in incoming requests. The Config Server exposes endpoints that resolve file paths based on URL parameters. When an attacker includes path traversal sequences in a specially crafted URL, the server resolves the path outside its intended directory structure, granting access to files elsewhere on the filesystem.

CVSS Breakdown

The CVSS v3.1 vector string assigned by VMware is AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N, resulting in a base score of 9.1 (Critical). Breaking this down:

MetricValueMeaning
Attack VectorNetworkExploitable remotely
Attack ComplexityLowNo special conditions required
Privileges RequiredNoneNo authentication needed
User InteractionNoneNo victim action required
Confidentiality ImpactHighArbitrary file read
Integrity ImpactHighPotential to influence served configurations
Availability ImpactNoneService remains operational

The combination of network accessibility, zero authentication requirements, and low complexity makes this vulnerability particularly dangerous in any environment where the Config Server is reachable from untrusted networks.

Attack Flow

Based on the advisory details, exploitation follows a straightforward pattern:

  1. The attacker identifies a Spring Cloud Config Server instance, which typically listens on a known port and exposes predictable endpoint patterns.
  2. The attacker constructs a URL containing path traversal sequences targeting a sensitive file (for example, configuration files containing credentials or system files).
  3. The attacker sends the crafted request to the Config Server. Depending on the target file type, the request may include an Accept: application/octet-stream header for binary content.
  4. The server, failing to properly validate the path, resolves the traversal sequences and returns the contents of the requested file.
  5. The attacker receives the file contents in the HTTP response, potentially gaining access to secrets, credentials, or other sensitive data managed by the Config Server or stored on the host filesystem.

Because the Config Server often has read access to Git repositories, SVN repositories, or local filesystem directories containing application secrets, the blast radius of this vulnerability extends well beyond the server itself.

Affected Systems and Versions

The following Spring Cloud Config release trains are affected:

Release TrainVulnerable VersionsFixed VersionAvailability
3.1.x3.1.0 through 3.1.13 (inclusive)3.1.14Enterprise Support Only
4.1.x4.1.0 through 4.1.9 (inclusive)4.1.10Enterprise Support Only
4.2.x4.2.0 through 4.2.6 (inclusive)4.2.7Enterprise Support Only
4.3.x4.3.0 through 4.3.2 (inclusive)4.3.3Open Source
5.0.x5.0.0 through 5.0.2 (inclusive)5.0.3Open Source

Older, unsupported versions of Spring Cloud Config are also affected. Organizations running versions outside these listed trains should assume they are vulnerable and migrate to a supported release immediately.

It is worth noting that fixes for the 3.1.x, 4.1.x, and 4.2.x branches are only available through VMware Tanzu Spring Enterprise Support. Organizations on these older branches without enterprise contracts will need to upgrade to the 4.3.x or 5.0.x trains to obtain the fix through open source channels.

The vendor advisory does not document any configuration workarounds, making version upgrades the only officially supported remediation path.

Vendor Security History

Spring Cloud Config is maintained under the Spring ecosystem, now managed by VMware (a Broadcom division following the November 2023 acquisition). VMware maintains a dedicated security advisory page at spring.io/security and follows a structured disclosure and patching process. The tiered support model, where older branch fixes are gated behind enterprise contracts, is a pattern that has become more pronounced since the Broadcom acquisition. This creates a practical gap for organizations on older open source deployments that need security patches but lack enterprise support agreements.

References

Detect & fix
what others miss

Security magnifying glass visualization