CVE-2023-1183 Overview
A path traversal and improper input validation vulnerability was discovered in LibreOffice that allows attackers to write arbitrary files to attacker-controlled locations on the target system. The vulnerability exists in how LibreOffice processes ODB (OpenDocument Database) files containing embedded database/script files with malicious SCRIPT commands.
Critical Impact
An attacker can craft a specially designed ODB file that, when opened by a victim, writes arbitrary content to a location determined by the attacker. This could lead to code execution, configuration tampering, or persistence mechanisms on the target system.
Affected Products
- LibreOffice (versions prior to patched releases)
- LibreOffice 7.5.0
- Fedora 38
- Red Hat Enterprise Linux 8.0
- Red Hat Enterprise Linux 9.0
Discovery Timeline
- July 10, 2023 - CVE-2023-1183 published to NVD
- November 21, 2024 - Last updated in NVD database
Technical Details for CVE-2023-1183
Vulnerability Analysis
This vulnerability (CWE-20: Improper Input Validation, CWE-22: Path Traversal) arises from insufficient validation of file paths within ODB database files. LibreOffice's handling of embedded scripts in ODB files fails to properly sanitize or restrict the destination path for file write operations triggered by SCRIPT commands.
When a user opens a maliciously crafted ODB file, the embedded database/script file can contain a SCRIPT command that instructs LibreOffice to write content to an arbitrary file system location. The lack of proper path validation means an attacker can specify paths outside the intended directory, enabling writes to sensitive system locations or user directories.
The local attack vector requires user interaction—specifically, the victim must open the malicious ODB file. However, once opened, no additional user consent is required for the file write operation to occur, making this an effective vector for social engineering attacks.
Root Cause
The root cause is improper input validation combined with path traversal weaknesses in LibreOffice's ODB file processing logic. The SCRIPT command handler does not adequately validate or sanitize the target file path specified within the database/script component of ODB files. This allows attackers to use path traversal sequences or absolute paths to write files to arbitrary locations accessible by the LibreOffice process.
Attack Vector
The attack requires local access in the form of the victim opening a malicious file. The attacker crafts an ODB file containing a specially constructed database/script file with a SCRIPT command that specifies an attacker-controlled destination path. The attack flow is as follows:
- Attacker creates a malicious ODB file with embedded script containing path traversal payload
- Victim receives the ODB file via email, download, or other delivery mechanism
- Victim opens the ODB file in LibreOffice
- LibreOffice processes the embedded script and writes attacker-controlled content to the specified location
- Attacker achieves arbitrary file write, potentially leading to code execution or system compromise
The vulnerability could be chained with other techniques to achieve code execution—for example, by writing to startup directories, cron jobs, or configuration files that are subsequently executed.
Detection Methods for CVE-2023-1183
Indicators of Compromise
- Unexpected ODB files appearing in email attachments or downloads
- LibreOffice processes writing files to unusual system locations
- New or modified files in startup directories, user profile locations, or system configuration paths after opening ODB files
- Suspicious database/script entries within ODB file archives
Detection Strategies
- Monitor file system write operations from LibreOffice processes (soffice.bin, soffice) for writes to sensitive directories
- Implement email gateway scanning for ODB files with suspicious embedded content
- Deploy endpoint detection rules that alert on LibreOffice writing to startup folders or system directories
- Use YARA rules to scan for ODB files containing path traversal patterns in embedded script components
Monitoring Recommendations
- Enable enhanced file integrity monitoring on critical system directories
- Configure audit logging for file creation events originating from office application processes
- Monitor for ODB file downloads and email attachments as potential initial infection vectors
- Review LibreOffice application logs for errors or warnings related to script processing
How to Mitigate CVE-2023-1183
Immediate Actions Required
- Update LibreOffice to the latest patched version immediately
- Block or quarantine ODB file attachments at email gateways until systems are patched
- Educate users about the risks of opening untrusted database files
- Consider temporarily disabling ODB file associations while evaluating patch deployment
Patch Information
LibreOffice has released security updates addressing this vulnerability. Organizations should update to the latest available version. Detailed patch information is available in the LibreOffice CVE-2023-1183 Advisory.
For Red Hat Enterprise Linux systems, consult the Red Hat CVE-2023-1183 Advisory for distribution-specific packages and updates.
Workarounds
- Restrict opening of ODB files from untrusted sources through group policy or application controls
- Configure application whitelisting to limit LibreOffice's ability to write to sensitive directories
- Use sandboxed environments or virtual machines for opening untrusted database files
- Implement read-only access controls on critical system directories to limit exploitation impact
# Example: Block ODB files at the mail gateway (Postfix example)
# Add to /etc/postfix/mime_header_checks
/name=[^>]*\.odb/ REJECT ODB files not permitted due to CVE-2023-1183
# Reload Postfix configuration
postfix reload
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


