Description
It was found that libreoffice before versions 6.0.7 and 6.1.3 was vulnerable to a directory traversal attack which could be used to execute arbitrary macros bundled with a document. An attacker could craft a document, which when opened by LibreOffice, would execute a Python method from a script in any arbitrary file system location, specified relative to the LibreOffice install location.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| [UNKNOWN] | libreoffice | 6.0.7, 6.1.3 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libreoffice | 1:6.1.3-1 | — |
| Debian 13 | libreoffice | 1:6.1.3-1 | — |
| Debian 12 | libreoffice | 1:6.1.3-1 | — |
| Debian 9 | libreoffice | 1:5.2.7-1+deb9u5 | DSA-4381-1 |
| Debian 8 | libreoffice | 1:4.3.3-2+deb8u12 | DLA-1669-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | libreoffice | 1:5.1.6~rc2-0ubuntu1~xenial6 | USN-3883-1 |
| Ubuntu 14.04 LTS | libreoffice | 1:4.2.8-0ubuntu5.5 | USN-3883-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 7 | autocorr-af +180 | 1:5.3.6.1-21.el7 | RHSA-2019:2130 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP1 | libixion | 0.14.1-4.3.8 | SUSE-SU-2019:1894-1 |
| SLES 15 SP1 | liborcus | 0.14.1-3.3.8 | SUSE-SU-2019:1894-1 |
| SLES 15 SP1 | libreoffice | 6.2.5.2-8.5.1 | SUSE-SU-2019:2003-1 |
| SLES 15 SP1 | libwps | 0.4.10-7.3.3 | SUSE-SU-2019:2003-1 |
| SLES 15 SP1 | myspell-dictionaries | 20190423-3.9.7 | SUSE-SU-2019:1894-1 |
| SLES 15 | libixion | 0.14.1-4.3.8 | SUSE-SU-2019:1894-1 |
| SLES 15 | liborcus | 0.14.1-3.3.8 | SUSE-SU-2019:1894-1 |
| SLES 15 | libreoffice | 6.2.5.2-3.18.5 | SUSE-SU-2019:1894-1 |
| SLES 15 | libwps | 0.4.10-3.6.7 | SUSE-SU-2019:1894-1 |
| SLES 15 | myspell-dictionaries | 20190423-3.9.7 | SUSE-SU-2019:1894-1 |
| SLES 12 SP4 | libixion | 0.14.1-13.9.2 | SUSE-SU-2019:1448-1 |
| SLES 12 SP4 | liborcus | 0.14.1-10.12.2 | SUSE-SU-2019:1448-1 |
| SLES 12 SP4 | libreoffice | 6.2.3.2-43.49.1 | SUSE-SU-2019:1448-1 |
| SLES 12 SP4 | libwps | 0.4.10-10.13.2 | SUSE-SU-2019:1448-1 |
| SLES 12 SP4 | myspell-dictionaries | 20190423-16.18.1 | SUSE-SU-2019:1448-1 |
| SLES 12 SP3 | libixion | 0.14.1-13.9.2 | SUSE-SU-2019:1448-1 |
| SLES 12 SP3 | liborcus | 0.14.1-10.12.2 | SUSE-SU-2019:1448-1 |
| SLES 12 SP3 | libreoffice | 6.2.3.2-43.49.1 | SUSE-SU-2019:1448-1 |
| SLES 12 SP3 | libwps | 0.4.10-10.13.2 | SUSE-SU-2019:1448-1 |
| SLES 12 SP3 | myspell-dictionaries | 20190423-16.18.1 | SUSE-SU-2019:1448-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | libreoffice | 7.1.5.2-3.13 | openSUSE-SU-2024:10983-1 |
| openSUSE Leap 15.1 | libixion | 0.14.1-lp151.4.3.1 | openSUSE-SU-2019:1929-1 |
| openSUSE Leap 15.1 | liborcus | 0.14.1-lp151.3.3.1 | openSUSE-SU-2019:1929-1 |
| openSUSE Leap 15.1 | libreoffice | 6.2.5.2-lp151.3.3.4 | openSUSE-SU-2019:1929-1 |
| openSUSE Leap 15.1 | libwps | 0.4.10-lp151.2.3.1 | openSUSE-SU-2019:1929-1 |
| openSUSE Leap 15.1 | mdds-1_4 | 1.4.3-lp151.2.1 | openSUSE-SU-2019:1929-1 |
| openSUSE Leap 15.1 | myspell-dictionaries | 20190423-lp151.2.3.1 | openSUSE-SU-2019:1929-1 |
| openSUSE Leap 15.0 | libixion | 0.14.1-lp151.4.3.1 | openSUSE-SU-2019:1929-1 |
| openSUSE Leap 15.0 | liborcus | 0.14.1-lp151.3.3.1 | openSUSE-SU-2019:1929-1 |
| openSUSE Leap 15.0 | libreoffice | 6.2.5.2-lp151.3.3.4 | openSUSE-SU-2019:1929-1 |
| openSUSE Leap 15.0 | libwps | 0.4.10-lp151.2.3.1 | openSUSE-SU-2019:1929-1 |
| openSUSE Leap 15.0 | mdds-1_4 | 1.4.3-lp151.2.1 | openSUSE-SU-2019:1929-1 |
| openSUSE Leap 15.0 | myspell-dictionaries | 20190423-lp151.2.3.1 | openSUSE-SU-2019:1929-1 |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 7 | autocorr-af +180 | 1:5.3.6.1-21.0.1.el7 | ELSA-2019-2130 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
LibreOffice Macro Code Execution
exploit/multi/fileformat/libreoffice_macro_exec
Exploit-DB 1
- LibreOffice < 6.0.7 / 6.1.3 - Macro Code Execution (Metasploit) EDB-46727 · local · Apr 18, 2019 · verified
GitHub 4 repositories
-
4nimanegra/libreofficeExploit1 ★ 3 · Apr 14, 2019
CVE-2018-16858 exploit implementation
-
Henryisnotavailable/CVE-2018-16858-Python ★ 1 · Aug 26, 2023
Python implementation of CVE-2018-16858
-
bantu2301/CVE-2018-16858 ★ 1 · Nov 9, 2022
-
phongld97/detect-cve-2018-16858 ★ 1 · Nov 7, 2019
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 11
- RHSA-2019:2130 Red Hat Security Advisory: libreoffice security and bug fix update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- USN-3883-1 libreoffice vulnerabilities Ubuntu Security Notices (USN) · Apr 22, 2026
- DSA-4381-1 libreoffice - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-1669-1 libreoffice - security update Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2024:10983-1 libreoffice-7.1.5.2-3.13 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2019:1448-1 Security update for LibreOffice SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2019:2003-1 Security update for libreoffice SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2019:1894-1 Security update for LibreOffice SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2019:1929-1 Security update for LibreOffice SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2023-2487 LibreOffice und OpenOffice: Schwachstelle ermöglicht Ausführen von beliebigem Programmcode mit Benutzerrechten BSI CERT-Bund (WID) · Sep 27, 2023
- ELSA-2019-2130 Low: libreoffice security and bug fix update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · Aug 13, 2019
References
- https://www.libreoffice.org/about-us/security/advisories/cve-2018-16858/
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16858
- http://packetstormsecurity.com/files/152560/LibreOffice-Macro-Code-Execution.html
- http://www.rapid7.com/db/modules/exploit/multi/fileformat/libreoffice_macro_exec
- 46727 exploit
- RHSA-2019:2130 vendor-advisory
- 20190815 [SECURITY] [DSA 4501-1] libreoffice security update mailing-list
- openSUSE-SU-2019:1929 vendor-advisory