ZDI-26-783: LibreOffice PDF File Parsing Out-Of-Bounds Write Remote Code Execution Vulnerability
ZDI disclosed a LibreOffice PDF parsing out-of-bounds write that can run code if a user opens a malicious file.
Heap buffer overflow in LibreOffice Draw PDF import
LibreOffice Draw has a heap buffer overflow (CWE-787) when importing an encrypted PDF. The importer takes the decryption-key length from the document’s own encryption dictionary and uses it to fill a fixed-size key buffer without checking that length, so a declared length larger than the buffer writes past its end. A person must open or import a crafted encrypted PDF (local, user interaction); the overflow can crash Draw and, as scored, has limited confidentiality and integrity impact with high availability impact on the vulnerable component. Anyone using an unfixed LibreOffice that includes Draw is affected; fixed versions reject an oversized declared key length. No public proof of concept is listed and the issue is not in the CISA KEV catalog, although the published CVSS 4.0 vector sets exploit maturity to P and scores the flaw 5.4 (medium).
What to do: Update LibreOffice to a fixed release that rejects an encryption-dictionary key length larger than the fixed key buffer; use the Document Foundation advisory and Ubuntu USN-8868-1 for the corrected packages rather than assuming a version number. Until patched, do not import or open untrusted encrypted PDFs in LibreOffice Draw.
| Product | Affected |
|---|---|
| The Document Foundation LibreOffice Draw | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
LibreOffice Draw can import PDF documents. A heap buffer overflow existed when importing an encrypted document. The length of the decryption key was taken from the document's own encryption dictionary and was used to fill a fixed size key buffer without being checked against it, so a length larger than that buffer wrote past its end. In fixed versions a declared key length larger than the buffer is rejected.
ZDI disclosed a LibreOffice PDF parsing out-of-bounds write that can run code if a user opens a malicious file.
Ubuntu's USN-8868-1 fixes LibreOffice flaws that could crash the app or execute code.
Today 2.5K readers · 5.1K views · 307 reads · all time 290K views