Skip to content
File upload Write-up Intermediate

Exploiting LibreOffice (CVE-2024-12425 and CVE-2024-12426)

Two vulnerabilities in LibreOffice allow an attacker to write semi-arbitrary files to the filesystem and to extract values from environment variables and INI-like files when a malicious document is loaded. Both occur without user interaction, affecting desktop and headless server scenarios.

Thomas Rinsma Follow

Published on codeanlabs.com

This is a write-up of CVE-2024-12425 and CVE-2024-12426, two vulnerabilities in LibreOffice which respectively allow an attacker to write to a semi-arbitrary file in the filesystem, and remotely extract values from environment variables and from INI-like files in the filesystem. Both occur upon loading the document…

Thomas Rinsma, on codeanlabs.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely improper handling of document content during loading, allowing file writes and information extraction without validation.

Impact

An attacker could write semi-arbitrary files and extract environment variables and INI-like file values, potentially leading to further compromise, in both desktop and server-side headless scenarios.

What the attacker needed

Victim opens a malicious document; or server converts a malicious document

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

LibreOffice is an office suite that can open documents. These bugs mean that just opening a specially crafted document can let an attacker create files on your computer or read some of your settings, without you clicking anything else. This matters both when a person opens the document and when a server uses LibreOffice to convert documents automatically.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

More by Thomas Rinsma

View all

4 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.