cbcvebase.
CVE-2019-9848
published 2019-07-17

CVE-2019-9848: LibreOffice has a feature where documents can specify that pre-installed scripts can be executed on various document events such as mouse-over, etc…

PriorityP277critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
EXPLOIT
EPSS
30.70%
98.0th percentile
LibreOffice has a feature where documents can specify that pre-installed scripts can be executed on various document events such as mouse-over, etc. LibreOffice is typically also bundled with LibreLogo, a programmable turtle vector graphics script, which can be manipulated into executing arbitrary python commands. By using the document event feature to trigger LibreLogo to execute python contained within a document a malicious document could be constructed which would execute arbitrary python commands silently without warning. In the fixed versions, LibreLogo cannot be called from a document event handler. This issue affects: Document Foundation LibreOffice versions prior to 6.2.5.

Affected

25 ranges
VendorProductVersion rangeFixed in
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
debiandebian_linux
debiandebian_linux
debiandebian_linux
debianlibreoffice< libreoffice 1:6.3.0-1 (bookworm)libreoffice 1:6.3.0-1 (bookworm)
debianlibreoffice< libreoffice 1:6.3.0~rc1-1 (bookworm)libreoffice 1:6.3.0~rc1-1 (bookworm)
document_foundationlibreoffice>= unspecified < 6.2.66.2.6
fedoraprojectfedora
fedoraprojectfedora
libreofficelibreoffice< 6.2.66.2.6
libreofficelibreoffice< 6.2.56.2.5
libreofficelibreoffice>= 0 < 1:6.3.0-11:6.3.0-1
libreofficelibreoffice>= 0 < 1:6.3.0~rc1-11:6.3.0~rc1-1
libreofficelibreoffice>= 0 < 1:6.3.0-11:6.3.0-1
libreofficelibreoffice>= 0 < 1:6.3.0~rc1-11:6.3.0~rc1-1
libreofficelibreoffice>= 0 < 1:6.3.0-11:6.3.0-1
libreofficelibreoffice>= 0 < 1:6.3.0~rc1-11:6.3.0~rc1-1
libreofficelibreoffice>= 0 < 1:6.3.0-11:6.3.0-1
libreofficelibreoffice>= 0 < 1:6.3.0~rc1-11:6.3.0~rc1-1
libreofficelibreoffice>= 0 < 1:5.1.6~rc2-0ubuntu1~xenial81:5.1.6~rc2-0ubuntu1~xenial8
libreofficelibreoffice>= 0 < 1:6.0.7-0ubuntu0.18.04.81:6.0.7-0ubuntu0.18.04.8
opensuseleap
opensuseleap

Detection & IOCsextracted from sources · hover to see the quote

filenamelibrefile.odt
pathdata/exploits/CVE-2019-9848/librefile.erb
commandexec(eval(str(__import__('base64').b64decode('<base64_payload>'))))
  • Detect ODT files containing a 'dom loaded' (document-open) event handler that references LibreLogo or executes Python code — the exploit binds a program event to trigger LibreLogo macro execution on document open.
  • Alert on LibreOffice processes spawning Python interpreter child processes, especially when the parent is triggered by a document event (mouse-over, document-open, etc.).
  • Inspect ODT/ODF document XML for script event handlers referencing LibreLogo URLs; CVE-2019-9850 bypass used insufficient URL validation, so look for obfuscated or variant-cased LibreLogo script URLs in document event bindings.
  • Flag documents with global script event handlers (e.g., document-open) pointing to pre-installed scripts — CVE-2019-9851 abused global event handlers as a separate bypass vector.
  • Look for base64-encoded Python payloads inside ODT document content, consistent with the Metasploit module's encoding pattern using __import__('base64').b64decode.
  • ·The default Metasploit payload for this exploit is python/meterpreter/reverse_tcp; defenders should tune network detection for outbound reverse TCP connections originating from LibreOffice/Python processes.
  • ·Affected versions are LibreOffice prior to 6.2.5 (CVE-2019-9848) and prior to 6.2.6 (CVE-2019-9850/9851); Red Hat Enterprise Linux 8 is listed as not affected for CVE-2019-9848.

CVSS provenance

nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.07.5HIGHAV:N/AC:L/Au:N/C:P/I:P/A:P
osv9.8CRITICAL
vendor_debian9.8CRITICAL
vendor_redhat9.8CRITICAL
vendor_ubuntu9.8CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.