CVE-2023-0950 Overview
CVE-2023-0950 is an Improper Validation of Array Index vulnerability (CWE-129) in the spreadsheet component of The Document Foundation LibreOffice. This vulnerability allows an attacker to craft a malicious spreadsheet document that triggers an array index underflow when loaded by a victim, potentially leading to arbitrary code execution.
The vulnerability stems from certain malformed spreadsheet formulas, such as AGGREGATE, that can be created with fewer parameters than the formula interpreter expects. When LibreOffice processes these malformed formulas, an array index underflow occurs, creating an exploitable condition where arbitrary code execution becomes possible.
Critical Impact
This vulnerability enables attackers to execute arbitrary code on victim systems through specially crafted spreadsheet documents, requiring only user interaction to open the malicious file.
Affected Products
- LibreOffice versions 7.4 prior to 7.4.6
- LibreOffice versions 7.5 prior to 7.5.1
- Debian Linux 10.0
Discovery Timeline
- 2023-05-25 - CVE-2023-0950 published to NVD
- 2025-04-23 - Last updated in NVD database
Technical Details for CVE-2023-0950
Vulnerability Analysis
This vulnerability exists in LibreOffice's spreadsheet formula processing engine. The root cause is inadequate validation of array indices when parsing certain spreadsheet formulas. When a formula like AGGREGATE is constructed with insufficient parameters, the formula interpreter attempts to access array elements using an index that underflows, resulting in memory access outside the intended bounds.
The exploitation requires local access in the sense that a victim must open a malicious spreadsheet file. However, this attack vector is highly practical as spreadsheet documents are commonly shared via email, file sharing services, and other collaboration platforms. Once the malicious document is opened, no additional user interaction is required for the vulnerability to trigger.
The impact of successful exploitation is severe, as it can lead to complete compromise of confidentiality, integrity, and availability of the affected system. An attacker could leverage this vulnerability to install malware, exfiltrate sensitive data, or use the compromised system as a pivot point for further attacks.
Root Cause
The vulnerability originates from improper validation of array index boundaries in the spreadsheet formula interpreter. Specifically, when processing formulas like AGGREGATE, the interpreter does not adequately verify that the number of parameters supplied matches the expected count. This allows an attacker to craft a formula with fewer parameters than expected, causing the interpreter to calculate a negative array index, which underflows and points to unintended memory locations.
Attack Vector
The attack requires social engineering to convince a victim to open a malicious spreadsheet document. The attack flow involves:
- An attacker crafts a spreadsheet document containing a malformed formula with insufficient parameters
- The document is delivered to the victim via email, file sharing, or other means
- When the victim opens the document in a vulnerable LibreOffice version, the malformed formula is processed
- The formula interpreter experiences an array index underflow due to missing parameters
- This underflow condition can be leveraged to achieve arbitrary code execution in the context of the user running LibreOffice
The vulnerability is particularly dangerous because spreadsheet documents are ubiquitous in business environments and users are accustomed to opening them without suspicion.
Detection Methods for CVE-2023-0950
Indicators of Compromise
- Unusual LibreOffice process behavior, including unexpected child processes or network connections
- Spreadsheet files with malformed or unusually constructed AGGREGATE or similar formulas
- LibreOffice crashes or abnormal terminations when opening specific spreadsheet files
- Memory access violations or segmentation faults in LibreOffice logs
Detection Strategies
- Monitor for LibreOffice processes spawning unexpected child processes or executing shell commands
- Implement file inspection solutions to scan inbound spreadsheet documents for malformed formula structures
- Deploy endpoint detection and response (EDR) solutions capable of detecting memory corruption exploitation attempts
- Configure application whitelisting to alert on or prevent unexpected code execution from LibreOffice processes
Monitoring Recommendations
- Enable verbose logging for LibreOffice to capture formula parsing errors and exceptions
- Implement centralized log collection to correlate LibreOffice-related events across the environment
- Monitor file system activity for spreadsheet documents originating from untrusted sources
- Deploy behavioral analysis to detect anomalous process activity following LibreOffice document opens
How to Mitigate CVE-2023-0950
Immediate Actions Required
- Update LibreOffice 7.4.x installations to version 7.4.6 or later
- Update LibreOffice 7.5.x installations to version 7.5.1 or later
- Educate users about the risks of opening spreadsheet documents from untrusted sources
- Consider temporarily disabling automatic formula execution in LibreOffice until patches are applied
Patch Information
The Document Foundation has released security patches addressing this vulnerability. Users should update to the following versions or later:
- LibreOffice 7.4 branch: Update to version 7.4.6 or later
- LibreOffice 7.5 branch: Update to version 7.5.1 or later
For detailed patch information, refer to the LibreOffice Security Advisory for CVE-2023-0950. Linux distribution users should check their distribution's security advisories, including the Debian Security Advisory DSA-5415 and Gentoo GLSA 2023-11-15.
Workarounds
- Avoid opening spreadsheet documents from untrusted or unknown sources until systems are patched
- Use alternative office suite applications temporarily for processing untrusted spreadsheets
- Implement network-level filtering to quarantine and scan inbound spreadsheet documents
- Consider using LibreOffice in a sandboxed environment or virtual machine when opening documents from external sources
# Verify LibreOffice version to confirm patched status
libreoffice --version
# On Debian-based systems, update LibreOffice via package manager
sudo apt update && sudo apt upgrade libreoffice
# On Gentoo systems, sync and update
emerge --sync && emerge -uDN libreoffice
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


