cve.bz

CVE-2026-6040 the document foundation libreoffice: Use After Free

5.4 mediumEPSS 0.2%

Medium (5.4) in the document foundation libreoffice. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
A heap use-after-free existed when importing the blank-width characters of an ODF number format. A position value read from the document was not checked against the length of the format-code string, so a malformed number format could be processed against memory outside that string. In fixed versions the position is bounds-checked before use.

Severity

CVSS 4.0

5.4 medium
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N/E:P

CVSS 3.1

7.3 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 5th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-06-15. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-416 Use After Free
CWE-787 Out-of-bounds Write
CWE-825 Expired Pointer Dereference
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-6040 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-6040?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-6040?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-6040 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
The Document Foundation LibreOfficefrom 25.8 before < 25.8.7
The Document Foundation LibreOfficefrom 26.2 before < 26.2.3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian13libreoffice4:25.2.3-2+deb13u5DEBIAN-CVE-2026-6040 DSA-6346-1
Debian14libreoffice4:26.2.3.2-2DEBIAN-CVE-2026-6040
Ubuntu22.04:LTSlibreoffice1:7.3.7-0ubuntu0.22.04.12USN-8534-1
Ubuntu24.04:LTSlibreoffice4:24.2.7-0ubuntu0.24.04.6UBUNTU-CVE-2026-6040 USN-8534-1
Ubuntu25.10libreofficeno fix listedUBUNTU-CVE-2026-6040
Ubuntu26.04:LTSlibreoffice4:26.2.4.2-0ubuntu0.26.04.2UBUNTU-CVE-2026-6040 USN-8534-1
SUSELinux Enterprise Module for Package Hub 15 SP7, Linux Enterprise Workstation Extension 15 SP7libreoffice26.2.5.1-150500.20.37.1SUSE-SU-2026:3140-1
openSUSELeap 16.0libreoffice26.8.1.1-bp160.1.1openSUSE-SU-2026:22216-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This LibreOffice vulnerability is rated as Important. If a user inadvertently opens a maliciously crafted OpenDocument Format (ODF) file, an attacker can execute unauthorized code, potentially resulting in complete control over the affected system.

Red Hat's mitigation

Users should exercise caution and avoid opening untrusted OpenDocument Format (ODF) files.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6libreofficeOut of support scope
Red Hat Enterprise Linux 7libreofficeNot affected
Red Hat Enterprise Linux 8libreofficeNot affected
Red Hat Enterprise Linux 9libreofficeNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-6040.

References

Check your stackJSON