CVE-2026-101930 in LibreOffice
Summary
by MITRE • 11/16/2026
LibreOffice Writer can open HTML documents, and an HTML document can bind macros to events of the document as a whole, such as the document being opened or closed. Macros bound to these events were not taken into account by the macro security check, so they could run when the document was opened, whatever the macro security level. In fixed versions these macros follow the macro security settings like any other macro in the document.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 11/16/2026
The vulnerability described involves a critical flaw in LibreOffice Writer's handling of HTML documents that contain embedded macros bound to specific events such as opening or closing the file. This issue stems from an oversight in the application's macro security enforcement mechanism, which failed to evaluate these event-bound scripts against the configured macro security policies before execution. In typical office document workflows, users rely on macro security settings to prevent potentially malicious code from running automatically upon loading a file. These settings generally range from disabling all macros entirely to allowing only trusted sources or prompting for permission each time. However, in this specific scenario, the application bypassed these safeguards when processing HTML files with attached event handlers, effectively rendering the user's chosen security level irrelevant for those particular scripts.
From a technical perspective, the root cause lies in how LibreOffice parses and initializes macro environments for different file formats. While standard ODF documents like .odt or .docx have well-defined structures where macros are explicitly flagged and checked against security policies during initialization, HTML files present a more complex parsing challenge due to their varied structure and potential for embedded scripting languages such as JavaScript or VBScript within the markup itself. When an HTML document is opened in LibreOffice Writer, it attempts to interpret any associated scripts linked to lifecycle events like onOpen or onClose. The software failed to route these specific event-driven macros through the same security validation pipeline used for other macro types. This gap allowed attackers to craft malicious HTML files that would execute arbitrary code immediately upon opening, without triggering warnings or requiring user consent, regardless of whether the system was set to block all macros by default.
The operational impact of this vulnerability is severe, particularly in enterprise environments where employees frequently receive documents via email or download them from untrusted sources. An attacker could distribute a specially crafted HTML file that exploits this flaw to execute malicious payloads such as keyloggers, ransomware, or remote access trojans directly on the victim's machine upon opening the document. Because the execution occurs silently and without user interaction beyond clicking open the file, it represents a high-risk vector for initial compromise in phishing campaigns. The lack of any security prompt means that even cautious users who have configured their systems to block macros by default remain vulnerable if they encounter this specific type of HTML-based attack. This undermines trust in the application's security model and exposes organizations to significant data loss or system takeover risks.
This flaw aligns with CWE-94, which describes Improper Control of Generation of Code (Code Injection), as it allows an attacker to inject and execute unintended code through a trusted application interface. Additionally, from the perspective of the MITRE ATT&CK framework, this vulnerability facilitates techniques related to Initial Access via Spearphishing Attachment and Execution via Application Opened by User. The automatic execution upon opening classifies it under persistence or privilege escalation vectors depending on the payload delivered, but primarily serves as a reliable method for gaining initial foothold in a target network. It highlights the importance of consistent security checks across all input formats supported by an application, ensuring that no code path bypasses established policy enforcement mechanisms.
Mitigation strategies focus heavily on applying vendor-provided patches and updates to ensure LibreOffice is running fixed versions where event-bound macros are properly subjected to macro security settings. Administrators should enforce strict macro policies using group policy or configuration profiles to minimize the attack surface, ideally setting the default level to block all macros unless explicitly trusted by a recognized publisher. Users must be educated about the risks of opening documents from unknown sources and encouraged to verify file origins before interaction. Furthermore, deploying endpoint detection and response solutions can help identify anomalous macro execution behaviors even if security settings are bypassed, providing an additional layer of defense against exploitation attempts targeting this specific weakness in document processing software.