CVE-2016-10327
Critical · 9.8CVSS
9.8
EPSS
3.6%
Published
Apr 14, 2017
CISA due date
—
Cloudanix analysis
A flaw in document processing software lets attackers take over a computer simply by tricking someone into opening a specially made picture file.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap-based buffer overflow in EnhWMFReader::ReadEnhWMF leading to out-of-bounds write during Enhanced Metafile (WMF/EMF) parsing, enabling memory corruption and potential arbitrary code execution.
Why it matters to the business
Attackers can achieve remote code execution on systems processing untrusted documents, resulting in full system compromise, data exfiltration, or ransomware deployment without user interaction beyond opening a file.
How an attack unfolds
An attacker crafts a malicious Enhanced Metafile image containing oversized or malformed records that trigger the buffer overflow in the WMF reader; the victim opens the document or preview in an affected LibreOffice version, causing the overflow to overwrite heap memory and execute attacker-controlled code.
How to fix it
Upgrade LibreOffice to a build containing commit 7485fc2a1484f31631f62f97e5c64c0ae74c6416 or later release after 2016-12-22; for packaged nri-jmx components ensure version 0 or equivalent patched distribution is deployed.
How to confirm the fix worked
Verify installed LibreOffice version is newer than the vulnerable cutoff or contains the referenced commit; test with known-good and known-malicious WMF samples in a sandbox to confirm absence of crash or memory corruption.
Typical attack path
- Craft malicious WMF/EMF image exploiting ReadEnhWMF bounds check failure
- Embed image in document or deliver standalone file via email, web, or shared storage
- Victim opens file or triggers preview in LibreOffice
- Overflow corrupts heap structures leading to code execution
- Attacker payload establishes persistence or exfiltrates data
How to detect it
Review application crash logs for WMF/EMF parsing faults, inspect document metadata for unusual EMF/WMF objects, and search endpoint telemetry for unexpected child processes spawned from LibreOffice when handling image files.
What your security team should do
- Immediately inventory all LibreOffice installations and prioritize upgrade to fixed versions
- Block or sandbox processing of untrusted WMF/EMF images until patched
- Monitor vulnerability disclosure lists for any newly published exploits given the 9.8 CVSS score
- Implement file-type filtering at mail gateways and file shares for EMF/WMF content
The record
LibreOffice before 2016-12-22 has an out-of-bounds write caused by a heap-based buffer overflow related to the EnhWMFReader::ReadEnhWMF function in vcl/source/filter/wmf/enhwmf.cxx.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | libreoffice | 0 | 1:5.2.5-1 |
| Debian:12 | libreoffice | 0 | 1:5.2.5-1 |
| Debian:13 | libreoffice | 0 | 1:5.2.5-1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | libixion | 0 | 0.12.1-12.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | libmwaw | 0 | 0.3.11-9.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | liborcus | 0 | 0.12.1-12.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | libreoffice | 0 | 5.3.3.2-40.5.9 |
| SUSE:Linux Enterprise Desktop 12 SP2 | libstaroffice | 0 | 0.0.3-2.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | libzmf | 0 | 0.0.1-2.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | myspell-dictionaries | 0 | 20170511-15.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | libixion | 0 | 0.12.1-13.2.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | libmwaw | 0 | 0.3.11-7.5.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | liborcus | 0 | 0.12.1-10.5.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | libreoffice | 0 | 5.3.5.2-43.5.4 |
| SUSE:Linux Enterprise Desktop 12 SP3 | libstaroffice | 0 | 0.0.3-4.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | libzmf | 0 | 0.0.1-4.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | myspell-dictionaries | 0 | 20170511-16.2.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | libixion | 0 | 0.12.1-12.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | libmwaw | 0 | 0.3.11-9.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | liborcus | 0 | 0.12.1-12.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | libreoffice | 0 | 5.3.3.2-40.5.9 |
| SUSE:Linux Enterprise Software Development Kit 12 SP3 | libixion | 0 | 0.12.1-13.2.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP3 | libmwaw | 0 | 0.3.11-7.5.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP3 | liborcus | 0 | 0.12.1-10.5.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP3 | libreoffice | 0 | 5.3.5.2-43.5.4 |
| SUSE:Linux Enterprise Workstation Extension 12 SP2 | libixion | 0 | 0.12.1-12.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP2 | libmwaw | 0 | 0.3.11-9.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP2 | liborcus | 0 | 0.12.1-12.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP2 | libreoffice | 0 | 5.3.3.2-40.5.9 |
| SUSE:Linux Enterprise Workstation Extension 12 SP2 | libstaroffice | 0 | 0.0.3-2.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP2 | libzmf | 0 | 0.0.1-2.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP2 | myspell-dictionaries | 0 | 20170511-15.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP3 | libixion | 0 | 0.12.1-13.2.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP3 | libmwaw | 0 | 0.3.11-7.5.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP3 | liborcus | 0 | 0.12.1-10.5.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP3 | libreoffice | 0 | 5.3.5.2-43.5.4 |
| SUSE:Linux Enterprise Workstation Extension 12 SP3 | libstaroffice | 0 | 0.0.3-4.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP3 | libzmf | 0 | 0.0.1-4.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP3 | myspell-dictionaries | 0 | 20170511-16.2.1 |
| Ubuntu:14.04:LTS | libreoffice | 0 | 1:4.2.8-0ubuntu5.1 |
| Ubuntu:16.04:LTS | libreoffice | 0 | 1:5.1.6~rc2-0ubuntu1~xenial2 |
| openSUSE:Tumbleweed | libreoffice | 0 | 7.1.5.2-3.13 |
Related vulnerabilities
- CVE-2024-12426 Exposure of Environmental Variables and arbitrary INI file values to an Unauthorized… Also affects libreoffice
- CVE-2024-12425 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')… Also affects libreoffice
- CVE-2024-7788 Improper Digital Signature Invalidation vulnerability in Zip Repair Mode of The Document… Also affects libreoffice
- CVE-2021-25636 LibreOffice supports digital signatures of ODF documents and macros within documents… Also affects libreoffice
- CVE-2021-25633 LibreOffice supports digital signatures of ODF documents and macros within documents… Also affects libreoffice
- CVE-2017-3157 By exploiting the way Apache OpenOffice before 4.1.4 renders embedded objects, an… Also affects libreoffice
- CVE-2017-12607 A vulnerability in OpenOffice's PPT file parser before 4.1.4, and specifically in… Also affects libreoffice
- CVE-2016-4324 Use-after-free vulnerability in LibreOffice before 5.1.4 allows remote attackers to… Also affects libreoffice