{"id":"CVE-2026-6040","state":"PUBLISHED","title":"Heap use-after-free in ODF number-format blank-width parsing","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.","publishedAt":"2026-06-15T16:21:53.903Z","updatedAt":"2026-07-23T12:08:09.144Z","severity":{"score":5.4,"label":"Medium","version":"4.0","vector":"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","source":"Document Fdn."},"assigner":"Document Fdn.","products":["The Document Foundation LibreOffice"],"affected":[{"vendor":"The Document Foundation","product":"LibreOffice","defaultStatus":"unknown","versions":[{"version":"25.8","status":"affected","lessThan":"< 25.8.7","versionType":"25.8 series"},{"version":"26.2","status":"affected","lessThan":"< 26.2.3","versionType":"26.2 series"}]}],"references":["https://www.libreoffice.org/about-us/security/advisories/cve-2026-6040","https://access.redhat.com/security/cve/CVE-2026-6040","https://bugzilla.redhat.com/show_bug.cgi?id=2488966","https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-6040.json"],"weaknesses":["CWE-416","CWE-787","CWE-825"],"ingestedAt":"2026-10-29T20:12:49.727Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/6xxx/CVE-2026-6040.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-6040","state":"PUBLISHED","datePublished":"2026-06-15T16:21:53.903Z","dateUpdated":"2026-07-23T12:08:09.144Z","assignerShortName":"Document Fdn.","assignerOrgId":"4fe7d05b-1353-44cc-8b7a-1e416936dff2","dateReserved":"2026-04-09T16:42:11.799Z"},"containers":{"cna":{"title":"Heap use-after-free in ODF number-format blank-width parsing","descriptions":[{"lang":"en","value":"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":[{"vendor":"The Document Foundation","product":"LibreOffice","defaultStatus":"unknown","versions":[{"version":"25.8","status":"affected","lessThan":"< 25.8.7","versionType":"25.8 series"},{"version":"26.2","status":"affected","lessThan":"< 26.2.3","versionType":"26.2 series"}]}],"references":[{"url":"https://www.libreoffice.org/about-us/security/advisories/cve-2026-6040"}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"PASSIVE","vulnConfidentialityImpact":"LOW","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"HIGH","subAvailabilityImpact":"NONE","exploitMaturity":"PROOF_OF_CONCEPT","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"MEDIUM","baseScore":5.4,"vectorString":"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"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","description":"CWE-416 Use After Free","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-787","lang":"en","description":"CWE-787 Out-of-bounds Write","type":"CWE"}]}],"providerMetadata":{"shortName":"Document Fdn.","orgId":"4fe7d05b-1353-44cc-8b7a-1e416936dff2","dateUpdated":"2026-06-15T16:21:53.903Z"},"datePublic":"2026-06-15T00:00:00.000Z","impacts":[{"capecId":"CAPEC-44","descriptions":[{"lang":"en","value":"CAPEC-44 Overflow Binary Resource File"}]}],"credits":[{"lang":"en","value":"Anthropic (automated discovery using Claude)","type":"finder"},{"lang":"en","value":"Trail of Bits (triage and validation)","type":"analyst"}],"source":{"discovery":"EXTERNAL"},"x_generator":{"engine":"Vulnogram 1.0.2"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-06-15T18:14:24.996356Z","id":"CVE-2026-6040","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-15T18:14:30.848Z"}},{"title":"libreoffice: LibreOffice: Heap use-after-free allows arbitrary code execution via malformed ODF number format","descriptions":[{"lang":"en","value":"A vulnerability was found in LibreOffice. If a user inadvertently opens a malicious OpenDocument Format (ODF) file, an attacker could execute unauthorized code and potentially gain full control of the system."}],"affected":[{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 6","packageName":"libreoffice","defaultStatus":"unknown","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/o:redhat:enterprise_linux:6"]},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 7","packageName":"libreoffice","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/o:redhat:enterprise_linux:7"]},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","packageName":"libreoffice","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/o:redhat:enterprise_linux:8"]},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","packageName":"libreoffice","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/o:redhat:enterprise_linux:9"]}],"references":[{"url":"https://access.redhat.com/security/cve/CVE-2026-6040","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2488966","name":"RHBZ#2488966","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-6040.json","tags":["x_sadp-csaf-vex"]}],"metrics":[{"other":{"content":{"namespace":"https://access.redhat.com/security/updates/classification/","value":"Important"},"type":"Red Hat severity rating"}},{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"HIGH","baseScore":7.3,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"LOW","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"format":"CVSS"}],"problemTypes":[{"descriptions":[{"cweId":"CWE-825","description":"Expired Pointer Dereference","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"redhat-SADP","orgId":"0b0ca135-0b70-47e7-9f44-1890c2a1c46c","dateUpdated":"2026-07-23T12:08:09.144Z"},"datePublic":"2026-06-15T16:21:53.903Z","timeline":[{"lang":"en","time":"2026-06-15T18:01:31.633Z","value":"Reported to Red Hat."},{"lang":"en","time":"2026-06-15T16:21:53.903Z","value":"Made public."}],"workarounds":[{"lang":"en","value":"Users should exercise caution and avoid opening untrusted OpenDocument Format (ODF) files."}],"x_adpType":"supplier","x_generator":{"engine":"sadp-cli 1.0.0"}}]}}}