CVE-2026-104692: LibreOffice RCE on Opening a Spreadsheet

CVE-2026-104692 and CVE-2026-104007 let a LibreOffice spreadsheet run code on open. A public PoC exists. Update to 26.2.7 or 26.8.2.

By Vivek • • 6 Min Read • 0 • Follow on Google News Add to Preferred Source
LibreOffice RCE

A public proof-of-concept exploit now shows that opening a single spreadsheet in LibreOffice can run an attacker’s code on Windows, macOS and Linux, with no macro warning and no security prompt, by chaining two flaws The Document Foundation disclosed on Monday.

The flaws are CVE-2026-104692, a missing restriction in LibreOffice’s bundled HSQLDB database engine, and CVE-2026-104007, which lets a document choose where a Java database driver is loaded from. The Document Foundation, which assigns CVE IDs for LibreOffice, rates each at 8.5 (High) on CVSS 4.0.

A researcher as ii4gsp has published a technical write-up, with a script that builds the malicious files and demo videos for all three operating systems. Both flaws are fixed in LibreOffice 26.2.7 and 26.8.2. Every earlier build in the 26.2 and 26.8 lines is affected, and the attack works only where a Java runtime is installed and enabled in LibreOffice.

How the LibreOffice Spreadsheet Attack Works

The malicious spreadsheet contains a form whose data source is a URL. When the document opens, LibreOffice loads the form automatically and fetches a database document, an .odb file, from the attacker’s server over HTTP. No prompt appears, according to the write-up.

That .odb file names a Java database (JDBC) driver and a class path, the list of locations Java searches for code. LibreOffice already strips the class path setting, JavaDriverClassPath, when a user opens a database document directly. The researcher found that the same filter is skipped when the database document is pulled in as a form’s external data source, so the attacker’s class path survives. That gap is CVE-2026-104007.

The attacker’s Java code does not come from the network. An .ods spreadsheet is a ZIP archive, and so is a Java JAR, so the spreadsheet itself carries the malicious class and the class path points back at the file the victim just opened.

The attacker cannot know where the victim saved the file, so the class path lists several likely folders, such as Downloads, Desktop and Documents, using LibreOffice variables that resolve to the user’s home directory at runtime. Java silently skips entries that do not exist, and one of them matches.

Why CVE-2026-104692 Completes the Chain on Windows and macOS

On Linux, CVE-2026-104007 is enough on its own, the researcher says: LibreOffice loads the attacker’s driver class and calls its connect() method, which runs the payload.

On Windows and macOS, the exploit takes a second step through HSQLDB, the Java database engine LibreOffice ships. HSQLDB lets a SQL statement call Java methods, and LibreOffice is supposed to limit that to an approved list. The list was initialised as null, and the check treated a null list as “allow everything”. With query validation switched off in the form, a SQL CALL statement reaches HSQLDB unmodified and invokes the attacker’s method. That is CVE-2026-104692.

The write-up notes the file can also be named .xlsx, because LibreOffice identifies the format from its content. It does not list the LibreOffice or operating system versions used in the demo videos, and it gives no disclosure timeline.

What the Fixes Change

For CVE-2026-104692, fixed versions restrict SQL to HSQLDB’s built-in functions; however, the database is still reached, the CVE record says. The researcher’s patch analysis shows the approved list now starts empty instead of null.

For CVE-2026-104007, the CVE record says fixed versions take the driver location only from the user’s own driver configuration, and that a pivot table sourced from a database named by URL connects only after the user allows link updates. The record describes the route through a pivot table; the public exploit uses a form data source. The record also states that this is a different route from CVE-2026-63277, the Calc JDBC flaw patched in October.

Two more code-execution flaws rated 8.5 were published the same day with the same fixed versions. CVE-2026-104920 is a route to loading a remote Java driver that the October fix for CVE-2026-63277 did not cover. CVE-2026-101892 lets a document with specially named form controls change LibreOffice’s configuration in a way that leads to code execution.

Is CVE-2026-104692 Being Exploited?

No source reports attacks using CVE-2026-104692 or CVE-2026-104007 as of November 16. Neither is in CISA’s Known Exploited Vulnerabilities catalog, and NVD has not yet analysed either record.

Working exploit code is public. The researcher’s post includes a Python script that generates the spreadsheet and the database document, plus the Java source for the driver. An attacker needs only a web server to host the .odb file and a way to get the spreadsheet opened.

The CVE records list the 26.2 and 26.8 lines as affected. They do not say whether older, unsupported lines such as 25.8, or the older builds some Linux distributions maintain, are vulnerable. Cyber Kendra could not confirm the status of distribution packages at the time of writing. The researcher’s post does not mention Apache OpenOffice.

What LibreOffice Users and Admins Should Do Now

Update LibreOffice to 26.8.2 or later, or to 26.2.7 on the older branch, from the official download page or the distribution’s package manager. Help > About LibreOffice shows the installed version, as does soffice --version on the command line.

LibreOffice 26.2.7 is the final release of the 26.2 line, which reaches end of life on November 30, 2026. Organisations still on 26.2 should plan the move to 26.8 now, because any flaw found after that date will be fixed only there.

The researcher lists one precondition for the attack: a “Java runtime installed and enabled in LibreOffice”. The setting is under Tools > Options > LibreOffice > Advanced, “Use a Java runtime environment”. Turning Java off removes that precondition, but it also disables features that depend on Java, including embedded HSQLDB databases in Base. The researcher’s post does not present this as a workaround, and Cyber Kendra could not retrieve The Document Foundation’s advisory text to check whether it lists one.

The exploit has to download the .odb file from an attacker’s server when the document opens. Defenders reviewing logs can look for the LibreOffice process, soffice, making an outbound HTTP request for a .odb file immediately after a spreadsheet is opened.

Community Discussion

Join the conversation. Ask questions, share solutions, and help others.

0 Comments

Be the first to start the discussion!

Leave a Comment

Your email address will not be published. Required fields are marked *

We respect your privacy, your information is safe with us.

Latest Articles

View all