cbcvebase.
CVE-2019-9851
published 2019-08-15

CVE-2019-9851: LibreOffice is typically bundled with LibreLogo, a programmable turtle vector graphics script, which can execute arbitrary python commands contained with the…

PriorityP278critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
EXPLOIT
EPSS
78.01%
99.5th percentile
LibreOffice is typically bundled with LibreLogo, a programmable turtle vector graphics script, which can execute arbitrary python commands contained with the document it is launched from. Protection was added, to address CVE-2019-9848, to block calling LibreLogo from document event script handers, e.g. mouse over. However LibreOffice also has a separate feature where documents can specify that pre-installed scripts can be executed on various global script events such as document-open, etc. In the fixed versions, global script event handlers are validated equivalently to document script event handlers. This issue affects: Document Foundation LibreOffice versions prior to 6.2.6.

Affected

17 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)
fedoraprojectfedora
libreofficelibreoffice< 6.2.66.2.6
libreofficelibreoffice>= 0 < 1:6.3.0-11:6.3.0-1
libreofficelibreoffice>= 0 < 1:6.3.0-11:6.3.0-1
libreofficelibreoffice>= 0 < 1:6.3.0-11:6.3.0-1
libreofficelibreoffice>= 0 < 1:6.3.0-11:6.3.0-1
libreofficelibreoffice>= 0 < 1:5.1.6~rc2-0ubuntu1~xenial91:5.1.6~rc2-0ubuntu1~xenial9
libreofficelibreoffice>= 0 < 1:6.0.7-0ubuntu0.18.04.91:6.0.7-0ubuntu0.18.04.9
opensuseleap
opensuseleap

Detection & IOCsextracted from sources · hover to see the quote

filenamelibrefile.odt
commandexec(eval(str(__import__('base64').b64decode('<base64_payload>'))))
  • Detect ODT files containing a 'dom loaded' global script event binding to a LibreLogo/Python macro, which is the delivery mechanism for this CVE.
  • Look for LibreOffice documents specifying pre-installed script execution on global script events (e.g., document-open) as an indicator of exploitation attempt.
  • Flag Python payloads delivered via LibreLogo that use base64-encoded exec/eval chains, characteristic of Metasploit exploitation of this CVE.
  • Default Metasploit payload for this exploit is python/meterpreter/reverse_tcp; monitor for outbound reverse TCP connections from LibreOffice processes.
  • ·The vulnerability affects LibreOffice versions prior to 6.2.6; patched versions validate global script event handlers equivalently to document script event handlers.
  • ·CVE-2019-9851 is a bypass of the earlier CVE-2019-9848 fix; detections targeting only document-level event handlers (mouse over) will miss global event handler abuse.

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.