A researcher has identified a serious remote code execution vulnerability affecting the LibreOffice and Apache OpenOffice open-source productivity suites, but a patch has only been released for the former.
Researcher Alex Inführ discovered that a malicious actor could use specially crafted documents to execute arbitrary code without any warning message being seen by the victim. All the targeted user needs to do is open a malicious ODT file and move the mouse anywhere over the document.
The expert has published a blog post detailing his findings and a video showing how the attack works. While the post and proof-of-concept (PoC) code focus on LibreOffice, the attack can be adapted for OpenOffice as well. Inführ says both Linux and Windows systems are impacted.
The vulnerability, tracked as CVE-2018-16858, has been described as a path traversal issue that allows an attacker to execute a Python file located anywhere on the targeted system. The attack is made easier by the fact that Python is bundled with LibreOffice and OpenOffice, which means the attacker does not need to worry about this component being installed on the targeted device.
The malicious document needs to contain a specially crafted link pointing to a Python method from a script. Using the onmouseover event, a piece of malware present on the system can be executed when the victim hovers over the link, without raising any suspicion.
In the demo created by Inführ, the color of the link has been set to white and the link covers an entire page in the document. The victim only sees a blank page, but the malicious code gets executed when they move their mouse over it.
The issue was reported to LibreOffice developers on October 18, 2018, and it was fixed less than two weeks later with the release of versions 6.0.7 and 6.1.3. OpenOffice developers have also been alerted, but they have yet to release a patch. Until a fix becomes available, users can disable Python support by removing or renaming the pythonscript.py file in the installation folder.
SecurityWeek has reached out to OpenOffice developers for comment and will update this article if they respond.
Related: Code Execution Flaws Patched in Apache OpenOffice
Related: Hackers Can Exploit LibreOffice Flaw With RTF Files