Quantum Secular Labs / Blog / Advisories
CVE-2018-16858: Libreoffice: Path traversal
CVE-2018-16858 is rated critical with a CVSS v3.0 base score of 9.8 and affects Libreoffice. Per its scoring, it can be exploited over the network, without authentication, without any user interaction. The scored impact on confidentiality, integrity and availability is the highest available.
Vulnerability 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.
Severity breakdown
CVSS v3.0 9.8: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack vector: Network. Exploitable remotely over the network, with no need for local or physical access.
- Attack complexity: Low. No special conditions; the attack can be repeated reliably.
- Privileges required: None. No account or prior access is needed.
- User interaction: None. No action from any user is needed.
- Scope: Unchanged. Impact stays within the vulnerable component.
- Confidentiality impact: High. Total loss of confidentiality; sensitive data can be fully disclosed.
- Integrity impact: High. Total loss of integrity; data or system state can be fully modified.
- Availability impact: High. Total loss of availability; the component can be shut down.
Underlying weakness
CWE-356: Missing User Interaction for Potentially Unsafe Action
The product encounters a situation in which some of its behavior is security-critical and should be authorized by a human before progressing, but it does not properly consult with the human user or its proxy (such as UI approval dialogues or pre-set policies) to determine whether it is allowed to perform the potentially dangerous behavior.
CWE-22: Improper Limitation of a Pathname to a Restricted Directory
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Affected products
- Libreoffice: before 6.0.7; from 6.1.0 before 6.1.3
References
- https://www.libreoffice.org/about-us/security/advisories/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
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16858
- https://www.exploit-db.com/exploits/46727/
- http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00059.html
- https://access.redhat.com/errata/RHSA-2019:2130
- https://seclists.org/bugtraq/2019/Aug/28