Home › Vulnerabilities

LibreOffice crafted documents run code Flaw CVE-2026-104007: Update Now

Published November 16, 2026 · Last updated November 16, 2026

CVE Patch

CVE-2026-104007 is one of 19 security problems that The Document Foundation fixed on November 16, 2026, in LibreOffice 26.2.7 and 26.8.2. Several are rated High because a booby-trapped document can make the free office suite run code on the victim's computer. In some cases this happens simply on opening the file, without the macro warning users rely on.

The foundation's advice is the same for all of them: "All users are recommended to upgrade to LibreOffice >= 26.2.7 or >= 26.8.2 to avoid this problem." None of these flaws is in the U.S. Cybersecurity and Infrastructure Security Agency's (CISA) Known Exploited Vulnerabilities catalog, and the advisories do not mention attacks.

Who is affected

According to the CVE records, LibreOffice 26.2 releases before 26.2.7 and 26.8 releases before 26.8.2 are affected. One issue, CVE-2026-100101, applies only to Linux and other Unix-like systems.

What goes wrong

CVE-2026-104007, code through the JDBC driver path. LibreOffice can connect to databases using Java (JDBC) drivers, and a spreadsheet can use a database as the source of a pivot table. The advisory explains that "the location the driver was loaded from was taken from the database document itself, so a crafted document could make LibreOffice load and run Java code that the document supplied when it was opened." The foundation calls this "a different route to the problem fixed for CVE-2026-63277," an earlier flaw fixed in October.

Other code-execution flaws fixed in the same release include:

  • CVE-2026-101352: a document's own keyboard shortcuts, menus and toolbars could run a macro "even when the macro security settings did not allow the macros of the document," so pressing a shortcut "could run code without any warning."
  • CVE-2026-101930: in HTML documents opened in Writer, macros tied to opening or closing the document "could run when the document was opened, whatever the macro security level."
  • CVE-2026-84443: macros tied to events in LibreOffice Base database files ran without the macro security setting, so "opening or converting a crafted database document could run a macro and, through it, any command."
  • CVE-2026-101892: form controls such as buttons in ODF files could name components that were not form controls, letting a crafted file change LibreOffice's configuration "in a way that led to code being run."
  • CVE-2026-104692: SQL in a crafted document using the bundled HSQLDB database engine "could call any Java method and run code."
  • CVE-2026-104920: a Calc data link could load a Java database driver "from a location outside the local machine and run its code," a route the earlier CVE-2026-63277 fix did not cover.
  • CVE-2026-108169: a web query file (.iqy) opened from a file manager or another program could make LibreOffice do "something other than open a web page, up to running code."
  • CVE-2026-100101 (Linux and other Unix-like systems): emailing a document with File > Send > Email Document let the shell interpret the file name, so "a file with a crafted name could run commands."

The remaining fixes in this release cover memory-safety bugs in image, font, PDF, spreadsheet and HWP import and export, in loading protected Basic libraries and in embedded database migration. Two further issues stand out:

  • CVE-2026-101353: the definition of an embedded HSQLDB database in a crafted Base document "could make the database engine create or write files at locations outside the document, chosen by the document."
  • CVE-2026-104933: where LibreOffice plays media with GStreamer, "as on Linux," a crafted media file could make GStreamer read a local file and draw its text into a video preview, "so that the content of the file ended up in an exported document," such as a PDF.

Other fixes announced the same day

The foundation also published advisories on November 16 for issues fixed in slightly earlier builds. Anyone moving to 26.2.7 or 26.8.2 gets these fixes as well:

  • CVE-2026-87932 (fixed in 26.2.7/26.8.1): exporting a crafted document to DOCX, including in a command-line conversion, "could write a file of its choosing anywhere the user can write." In fixed versions, according to the advisory, the XSLT transformations LibreOffice runs "can no longer write files or use the network."
  • CVE-2026-18564 (fixed in 26.2.6): password-protected PDF 2.0 exports used a random number generator "that is not suitable for cryptography, so the encryption key of an exported PDF could be recovered without knowing the password." People who shared protected PDFs made with older versions may want to re-export them; this is our suggestion.
  • CVE-2026-18565 (fixed in 26.2.7/26.8.1): with the optional "stealth mode" setting switched on, a linked background image in an HTML document was still fetched during import.
  • CVE-2026-106535 (fixed in libvisio 0.1.11): an out-of-bounds write in libvisio, the library that LibreOffice "and other applications use" to import Visio VSD and VSDX drawings.

Who found them

The advisories credit a range of outside researchers. CVE-2026-104007 was reported by Thomas Rinsma and Edoardo Geraci of Codean Labs and by several other researchers, including members of the Hacktron AI Research Team and NSHC Red Alert Labs. CVE-2026-101352 was found by Anthropic "using agents to study the security of open-source projects," with Ada Logics validating and reporting, and was also reported by a researcher working with the TrendAI Zero Day Initiative. For both flaws, the advisories thank Caolán McNamara of Collabora Productivity for providing the fix.

Severity and who scored it

The Document Foundation, the CVE Numbering Authority for LibreOffice, scored CVE-2026-104007 CVSS 4.0 8.5 (High), vector AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N. That means a local attack (the victim opens a file), no privileges, passive user interaction, and high impact on confidentiality, integrity and availability. It gave the same 8.5 to CVE-2026-101352, CVE-2026-101892, CVE-2026-101930, CVE-2026-104692, CVE-2026-104920 and CVE-2026-84443, 8.4 to CVE-2026-100101, and 7.3 to CVE-2026-108169. NVD lists these scores as coming from the foundation and had not added its own when we checked.

The fix

The advisories list each flaw as "Fixed in: LibreOffice 26.2.7/26.8.2" and explain what changed. For example, for CVE-2026-104007, "the driver location is taken only from the driver configuration of the user". For the macro issues, macros in shortcuts, HTML events and Base events now "follow the macro security settings like any other macro in the document."

What to do

  • Everyone who uses LibreOffice: update to 26.2.7 or later, or 26.8.2 or later, from the official download page or your system's update tool.
  • IT administrators: push the update to managed computers and check Linux distribution packages, which may arrive on the distribution's own schedule.
  • Until you update: be careful with documents, spreadsheets, database files and .iqy files from unknown senders, since several of these flaws bypass the macro warning. This is general advice, not the foundation's.
  • Users of other office packages built on LibreOffice, or apps that import Visio files through libvisio: ask the vendor whether these fixes are included.

Timeline

  • October 5, 2026: CVE-2026-63277 fixed in LibreOffice 26.2.5 and 26.8.0.
  • November 16, 2026: The Document Foundation announced these advisories, fixed in LibreOffice 26.2.7 and 26.8.2, and published the CVE records.

Sources

  • LibreOffice advisory, CVE-2026-104007: https://www.libreoffice.org/about-us/security/advisories/cve-2026-104007
  • LibreOffice advisory, CVE-2026-101352: https://www.libreoffice.org/about-us/security/advisories/cve-2026-101352
  • LibreOffice security advisories: https://www.libreoffice.org/about-us/security/advisories/
  • CVE record: https://www.cve.org/CVERecord?id=CVE-2026-104007

Sources

General education only, not security advice. Facts checked against the sources above on the date shown.