Kimaya Kelbaikar • CVE-2019-9848 • LibreOffice • University of Chester
For my Software Exploitation assessment at the University of Chester, I needed to demonstrate a real-world vulnerability in a controlled, ethical environment. Most people default to dry slideshows and technical writeups. I chose a different path — one that ended with Rick Astley singing to my entire class.
The vulnerability in question: CVE-2019-9848, a critical flaw in LibreOffice that allows arbitrary Python code execution via a simple mouse hover. No clicks. No downloads. Just hover over text, and the attacker owns your browser.
⚠️ Educational DisclaimerThis demonstration was conducted in a controlled academic environment under faculty supervision. The techniques described here are shared strictly for educational purposes. Always practice ethical hacking legally and responsibly.
LibreOffice ships with a feature called LibreLogo — a turtle-graphics programming environment baked right into the word processor. What the developers didn't adequately restrict is that LibreLogo macros can call arbitrary Python code, and those macros can be silently triggered by mouse events embedded in document hyperlinks.
Translation: craft a document, embed a hyperlink, assign a macro to the “Mouse Over Object” event, and anyone who opens the file and hovers their cursor over that text executes your Python payload. Zero clicks required.
import webbrowser
webbrowser.open('https://youtu.be/dQw4w9WgXcQ')
# Two lines. That's all it takes.
NIST rated this vulnerability CVSS 9.8 — Critical. In real-world attacks, the payload wouldn't launch a YouTube video; it could silently exfiltrate credentials, install ransomware, or establish a reverse shell.
import webbrowser + webbrowser.open(rickroll_url).🎵 Never Gonna Give You Up
youtube.com/watch?v=dQw4w9WgXcQ — triggered without a single click
The reaction in the room was exactly what I'd hoped for — first confusion, then laughter, then the dawning realisation that something genuinely dangerous had just happened. A real attacker wouldn't have launched a YouTube video. They could have silently:
The prank made the risk viscerally real in a way that a CVE description on a slide never could.
This vulnerability was patched in LibreOffice 6.2.5 and 6.3.1. If your organisation is still running older versions of LibreOffice, you are exposed. Patch management isn't glamorous work, but this is exactly why it matters.
LibreOffice's macro security settings should be set to “High” or “Very High” in any environment where untrusted documents are opened. This prevents unsigned macros from executing automatically.
The most dangerous attacks require no action from the victim beyond opening a file. No “enable macros” prompt. No phishing link to click. Just hover. This should fundamentally change how you think about opening documents from unknown sources.
🔒 Mitigation ChecklistUpdate LibreOffice to 6.2.5+ or 6.3.1+ · Set macro security to High · Never open untrusted ODT/ODP/ODS files · Use sandboxed document viewers in enterprise environments