# CVE-2026-6040: Heap use-after-free in ODF number-format blank-width parsing

- Severity: Medium 5.4 (CVSS:4.0, scored by Document Fdn.) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2026-06-15T16:21:53.903Z
- Modified: 2026-10-25T23:10:00.167Z
- Weaknesses: CWE-416, CWE-787, CWE-825
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Document Fdn.

## 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.

(As written by CVE List.)

## Affected

- The Document Foundation LibreOffice: from 25.8 before < 25.8.7; from 26.2 before < 26.2.3
- libreoffice: no versions given

## Every score

- Document Fdn.: 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`
- redhat-SADP: 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`

## References

- <https://www.libreoffice.org/about-us/security/advisories/cve-2026-6040>
- <https://access.redhat.com/security/cve/CVE-2026-6040> (vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2488966> (issue-tracking)
- <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-6040.json>

## Sources

- CVE List: [CVE-2026-6040](https://www.cve.org/CVERecord?id=CVE-2026-6040), CVE Terms of Use, modified 2026-07-23
- NVD: [CVE-2026-6040](https://nvd.nist.gov/vuln/detail/CVE-2026-6040), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-6040 · Whole record: https://cve.day/CVE-2026-6040.json · Rebuilt by cve.day 2026-11-25T22:59:24.645Z
