Vulnerability · Published Jun 15, 2026 · Assigned by Document Fdn.
CVE-2026-6040Heap use-after-free in ODF number-format blank-width parsing
High 7.3
In plain English
A high-severity use-after-free in LibreOffice from The Document Foundation. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 5% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:13 | libreoffice | 4:25.2.3-2+deb13u5 | DEBIAN-CVE-2026-6040 |
| Debian:14 | libreoffice | 4:26.2.3.2-2 | DEBIAN-CVE-2026-6040 |
| Ubuntu:22.04:LTS | libreoffice | 1:7.3.7-0ubuntu0.22.04.12 | USN-8534-1 |
| Ubuntu:24.04:LTS | libreoffice | 4:24.2.7-0ubuntu0.24.04.6 | USN-8534-1 |
| Ubuntu:24.04:LTS | libreoffice | 4:24.2.7-0ubuntu0.24.04.6 | UBUNTU-CVE-2026-6040 |
| Ubuntu:25.10 | libreoffice | no fix listed | UBUNTU-CVE-2026-6040 |
| Ubuntu:26.04:LTS | libreoffice | 4:26.2.4.2-0ubuntu0.26.04.2 | USN-8534-1 |
| Ubuntu:26.04:LTS | libreoffice | 4:26.2.4.2-0ubuntu0.26.04.2 | UBUNTU-CVE-2026-6040 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| The Document Foundation | LibreOffice | 25.8 – before < 25.8.726.2 – before < 26.2.3 |
Weakness: CWE-416, CWE-787, CWE-825 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
References
- https://www.libreoffice.org/about-us/security/advisories/cve-2026-6040
- https://access.redhat.com/security/cve/CVE-2026-6040 vdb-entry, x_refsource_REDHAT
- RHBZ#2488966 issue-tracking, x_refsource_REDHAT
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-6040.json x_sadp-csaf-vex