{"answers":{"affected":"It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2018-16858 exists.","fix":"Upgrade to a fixed version.","what":"CVE-2018-16858 is a high-severity path traversal vulnerability in Libreoffice Libreoffice, published on 25 Mar 2019. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2018-16858 and fix it if it is affected.\n\nWhat it is: CVE-2018-16858 is a high-severity path traversal vulnerability in Libreoffice Libreoffice, published on 25 Mar 2019. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2018-16858 exists.\n\nAffected product: Libreoffice Libreoffice. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2018-16858/ (Markdown: https://insights.sbomify.com/CVE-2018-16858/index.md)","id":"CVE-2018-16858","markdown":"https://insights.sbomify.com/CVE-2018-16858/index.md","name":"CVE-2018-16858","record":{"aliases":["DEBIAN-CVE-2018-16858","DLA-1669-1","DSA-4381-1","GHSA-v39m-j232-p3qr","MGASA-2019-0102","RHSA-2019:2130","SUSE-SU-2019:1448-1","SUSE-SU-2019:1894-1","SUSE-SU-2019:2003-1","UBUNTU-CVE-2018-16858","openSUSE-SU-2019:1929-1"],"analysis":{"component_type":"desktop_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"LibreOffice office suite","requires_auth":"none","summary":"Attackers can execute arbitrary Python macros via crafted documents using directory traversal, requiring users to open malicious files in LibreOffice.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[{"product":"libreoffice","vendor":"libreoffice"}],"cvss":{"score":7.8,"severity":"high","source":"cna","vector":"CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.0"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"id":"CWE-356","name":"Missing User Interaction for Potentially Unsafe Action"}],"description":"It was found that libreoffice before versions 6.0.7 and 6.1.3 was vulnerable to a directory traversal attack which could be used to execute arbitrary macros bundled with a document. An attacker could craft a document, which when opened by LibreOffice, would execute a Python method from a script in any arbitrary file system location, specified relative to the LibreOffice install location.","ecosystems":["Red Hat:enterprise_linux:7::client","Red Hat:enterprise_linux:7::server","Red Hat:enterprise_linux:7::workstation","SUSE:Linux Enterprise Desktop 12 SP3","SUSE:Linux Enterprise Desktop 12 SP4","SUSE:Linux Enterprise Module for Basesystem 15","SUSE:Linux Enterprise Module for Basesystem 15 SP1","SUSE:Linux Enterprise Software Development Kit 12 SP3","SUSE:Linux Enterprise Software Development Kit 12 SP4","SUSE:Linux Enterprise Workstation Extension 12 SP3","SUSE:Linux Enterprise Workstation Extension 12 SP4","SUSE:Linux Enterprise Workstation Extension 15","SUSE:Linux Enterprise Workstation Extension 15 SP1","openSUSE:Leap 15.0","openSUSE:Leap 15.1"],"exploits":{"exploitdb":2,"first_seen":"2018-10-18","github_poc":4,"max_poc_stars":3,"metasploit":1,"nuclei":0,"refs":[{"date":"2019-04-14T11:10:18Z","kind":"github_poc","ref":"https://github.com/4nimanegra/libreofficeExploit1","stars":3,"title":"CVE-2018-16858 exploit implementation"},{"date":"2019-11-07T07:40:49Z","kind":"github_poc","ref":"https://github.com/phongld97/detect-cve-2018-16858","stars":1,"title":null},{"date":"2022-11-09T13:36:40Z","kind":"github_poc","ref":"https://github.com/bantu2301/CVE-2018-16858","stars":1,"title":null},{"date":"2023-08-26T14:50:55Z","kind":"github_poc","ref":"https://github.com/Henryisnotavailable/CVE-2018-16858-Python","stars":1,"title":"Python implementation of CVE-2018-16858 "},{"date":"2018-10-18","kind":"metasploit","ref":"exploit/multi/fileformat/libreoffice_macro_exec","stars":null,"title":"LibreOffice Macro Code Execution"},{"date":"2019-04-18","kind":"exploitdb","ref":"46727","stars":null,"title":"LibreOffice \u003c 6.0.7 / 6.1.3 - Macro Code Execution (Metasploit)"},{"date":"2019-04-18","kind":"exploitdb","ref":"46727","stars":null,"title":"LibreOffice \u003c 6.0.7 / 6.1.3 - Macro Code Execution (Metasploit)"}],"tier":"weaponised"},"has_fix":true,"headline":"Path traversal in libreoffice","id":"CVE-2018-16858","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"libreoffice:libreoffice","products":["libreoffice:libreoffice"],"type":"path_traversal","year":"2018"},"n_packages":598,"n_references":8,"next":{"headline":"Ansible Logs Passwords If PowerShell ScriptBlock is Enabled","id":"CVE-2018-16859"},"packages":[{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-af","purl":"pkg:rpm/redhat/autocorr-af","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-bg","purl":"pkg:rpm/redhat/autocorr-bg","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-ca","purl":"pkg:rpm/redhat/autocorr-ca","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-cs","purl":"pkg:rpm/redhat/autocorr-cs","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-da","purl":"pkg:rpm/redhat/autocorr-da","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-de","purl":"pkg:rpm/redhat/autocorr-de","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-en","purl":"pkg:rpm/redhat/autocorr-en","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-es","purl":"pkg:rpm/redhat/autocorr-es","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-fa","purl":"pkg:rpm/redhat/autocorr-fa","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-fi","purl":"pkg:rpm/redhat/autocorr-fi","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-fr","purl":"pkg:rpm/redhat/autocorr-fr","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-ga","purl":"pkg:rpm/redhat/autocorr-ga","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-hr","purl":"pkg:rpm/redhat/autocorr-hr","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-hu","purl":"pkg:rpm/redhat/autocorr-hu","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-is","purl":"pkg:rpm/redhat/autocorr-is","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-it","purl":"pkg:rpm/redhat/autocorr-it","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-ja","purl":"pkg:rpm/redhat/autocorr-ja","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-ko","purl":"pkg:rpm/redhat/autocorr-ko","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-lb","purl":"pkg:rpm/redhat/autocorr-lb","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-lt","purl":"pkg:rpm/redhat/autocorr-lt","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-mn","purl":"pkg:rpm/redhat/autocorr-mn","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-nl","purl":"pkg:rpm/redhat/autocorr-nl","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-pl","purl":"pkg:rpm/redhat/autocorr-pl","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-pt","purl":"pkg:rpm/redhat/autocorr-pt","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-ro","purl":"pkg:rpm/redhat/autocorr-ro","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-ru","purl":"pkg:rpm/redhat/autocorr-ru","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-sk","purl":"pkg:rpm/redhat/autocorr-sk","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-sl","purl":"pkg:rpm/redhat/autocorr-sl","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-sr","purl":"pkg:rpm/redhat/autocorr-sr","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-sv","purl":"pkg:rpm/redhat/autocorr-sv","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-tr","purl":"pkg:rpm/redhat/autocorr-tr","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-vi","purl":"pkg:rpm/redhat/autocorr-vi","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"autocorr-zh","purl":"pkg:rpm/redhat/autocorr-zh","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"libreoffice","purl":"pkg:rpm/redhat/libreoffice","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"libreoffice-base","purl":"pkg:rpm/redhat/libreoffice-base","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"libreoffice-bsh","purl":"pkg:rpm/redhat/libreoffice-bsh","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"libreoffice-calc","purl":"pkg:rpm/redhat/libreoffice-calc","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"libreoffice-core","purl":"pkg:rpm/redhat/libreoffice-core","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"libreoffice-data","purl":"pkg:rpm/redhat/libreoffice-data","source":"RHSA-2019:2130"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["1:5.3.6.1-21.el7"],"introduced":["0"],"last_affected":[],"package":"libreoffice-debuginfo","purl":"pkg:rpm/redhat/libreoffice-debuginfo","source":"RHSA-2019:2130"}],"prev":{"headline":"Security feature bypass in samba","id":"CVE-2018-16857"},"products":["libreoffice"],"published":"2019-03-25","related":[{"cvss_score":10,"headline":"TLS certificate are not properly verified when utilizing LibreOfficeKit","id":"CVE-2024-5261","kev_date_added":null,"published":"2024-06-25"},{"cvss_score":9.8,"headline":"Windows 8.3 path equivalence handling flaw allows LibreLogo script execution","id":"CVE-2019-9855","kev_date_added":null,"published":"2019-09-06"},{"cvss_score":9.8,"headline":"Memory corruption in n/a","id":"CVE-2018-14939","kev_date_added":null,"published":"2018-08-05"},{"cvss_score":9.8,"headline":"Memory corruption in n/a","id":"CVE-2017-8358","kev_date_added":null,"published":"2017-04-30"},{"cvss_score":9.8,"headline":"Memory corruption in n/a","id":"CVE-2017-7882","kev_date_added":null,"published":"2017-04-15"},{"cvss_score":9.8,"headline":"Memory corruption in n/a","id":"CVE-2016-10327","kev_date_added":null,"published":"2017-04-14"},{"cvss_score":9.8,"headline":"Memory corruption in n/a","id":"CVE-2017-7856","kev_date_added":null,"published":"2017-04-14"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"BSD-3-Clause","name":"Metasploit"},{"class":"attribution","licence":"GPL-2.0-or-later","name":"Exploit-DB"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-05","vendors":["[UNKNOWN]"]},"summary":"Attackers can execute arbitrary Python macros via crafted documents using directory traversal, requiring users to open malicious files in LibreOffice.","url":"https://insights.sbomify.com/CVE-2018-16858/"}