{"answers":{"affected":"It affects 4 products.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2018-19518 exists.","fix":"Apply the vendor's patch.","what":"CVE-2018-19518 is a high-severity command injection vulnerability in Canonical Ubuntu Linux, published on 25 Nov 2018. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2018-19518 and fix it if it is affected.\n\nWhat it is: CVE-2018-19518 is a high-severity command injection vulnerability in Canonical Ubuntu Linux, published on 25 Nov 2018. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2018-19518 exists.\n\nAffected product: Canonical Ubuntu Linux. 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-19518/ (Markdown: https://insights.sbomify.com/CVE-2018-19518/index.md)","id":"CVE-2018-19518","markdown":"https://insights.sbomify.com/CVE-2018-19518/index.md","name":"CVE-2018-19518","record":{"aliases":["AZL-37053","AZL-37158","CVE-2018-1000859","DEBIAN-CVE-2018-19518","DLA-1700-1","DLA-2866-1","GHSA-5qmr-54g6-4256","MGASA-2018-0484","SUSE-SU-2018:3986-1","SUSE-SU-2018:3988-1","SUSE-SU-2018:3995-1","UBUNTU-CVE-2018-19518","USN-4160-1"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"IMAP Toolkit library","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary OS commands via argument injection in the IMAP Toolkit if rsh is replaced by ssh and server names are untrusted.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"ubuntu_linux","vendor":"canonical"},{"product":"debian_linux","vendor":"debian"},{"product":"php","vendor":"php"},{"product":"uw-imap","vendor":"uw-imap_project"}],"cvss":{"score":7.5,"severity":"high","source":"nvd","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-88","name":"Improper Neutralization of Argument Delimiters in a Command"}],"description":"University of Washington IMAP Toolkit 2007f on UNIX, as used in imap_open() in PHP and other products, launches an rsh command (by means of the imap_rimap function in c-client/imap4r1.c and the tcp_aopen function in osdep/unix/tcp_unix.c) without preventing argument injection, which might allow remote attackers to execute arbitrary OS commands if the IMAP server name is untrusted input (e.g., entered by a user of a web application) and if rsh has been replaced by a program with different argument semantics. For example, if rsh is a link to ssh (as seen on Debian and Ubuntu systems), then the attack can use an IMAP server name containing a \"-oProxyCommand\" argument.","ecosystems":["SUSE:Linux Enterprise Module for Web and Scripting 12","SUSE:Linux Enterprise Server 11 SP4","SUSE:Linux Enterprise Server for SAP Applications 11 SP4","SUSE:Linux Enterprise Software Development Kit 11 SP4","SUSE:Linux Enterprise Software Development Kit 12 SP3","SUSE:Linux Enterprise Software Development Kit 12 SP4"],"exploits":{"exploitdb":2,"first_seen":"2018-10-23","github_poc":2,"max_poc_stars":4,"metasploit":1,"nuclei":0,"refs":[{"date":"2023-04-15T09:31:45Z","kind":"github_poc","ref":"https://github.com/houqe/EXP_CVE-2018-19518","stars":4,"title":null},{"date":"2018-10-23","kind":"metasploit","ref":"exploit/linux/http/php_imap_open_rce","stars":null,"title":"php imap_open Remote Code Execution"},{"date":"2018-11-29","kind":"exploitdb","ref":"45914","stars":null,"title":"PHP imap_open - Remote Code Execution (Metasploit)"},{"date":"2018-11-29","kind":"exploitdb","ref":"45914","stars":null,"title":"PHP imap_open - Remote Code Execution (Metasploit)"},{"date":"2018-12-31T16:36:49Z","kind":"github_poc","ref":"https://github.com/ensimag-security/CVE-2018-19518","stars":0,"title":"some works on CVE-2018-19518 "}],"tier":"weaponised"},"has_fix":true,"headline":"Command injection in n/a","id":"CVE-2018-19518","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"canonical:ubuntu_linux","products":["canonical:ubuntu_linux","debian:debian_linux","php:php"],"type":"command_injection","year":"2018"},"n_packages":9,"n_references":20,"next":{"headline":"Memory corruption in n/a","id":"CVE-2018-19519"},"packages":[{"ecosystem":"SUSE:Linux Enterprise Module for Web and Scripting 12","fixed":["5.5.14-109.45.2"],"introduced":["0"],"last_affected":[],"package":"php5","purl":"pkg:rpm/suse/php5\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Web%20and%20Scripting%2012","source":"SUSE-SU-2018:3995-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Web and Scripting 12","fixed":["7.0.7-50.56.2"],"introduced":["0"],"last_affected":[],"package":"php7","purl":"pkg:rpm/suse/php7\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Web%20and%20Scripting%2012","source":"SUSE-SU-2018:3988-1"},{"ecosystem":"SUSE:Linux Enterprise Server 11 SP4","fixed":["5.3.17-112.45.1"],"introduced":["0"],"last_affected":[],"package":"php53","purl":"pkg:rpm/suse/php53\u0026distro=SUSE%20Linux%20Enterprise%20Server%2011%20SP4","source":"SUSE-SU-2018:3986-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 11 SP4","fixed":["5.3.17-112.45.1"],"introduced":["0"],"last_affected":[],"package":"php53","purl":"pkg:rpm/suse/php53\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2011%20SP4","source":"SUSE-SU-2018:3986-1"},{"ecosystem":"SUSE:Linux Enterprise Software Development Kit 11 SP4","fixed":["5.3.17-112.45.1"],"introduced":["0"],"last_affected":[],"package":"php53","purl":"pkg:rpm/suse/php53\u0026distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2011%20SP4","source":"SUSE-SU-2018:3986-1"},{"ecosystem":"SUSE:Linux Enterprise Software Development Kit 12 SP3","fixed":["5.5.14-109.45.2"],"introduced":["0"],"last_affected":[],"package":"php5","purl":"pkg:rpm/suse/php5\u0026distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP3","source":"SUSE-SU-2018:3995-1"},{"ecosystem":"SUSE:Linux Enterprise Software Development Kit 12 SP3","fixed":["7.0.7-50.56.2"],"introduced":["0"],"last_affected":[],"package":"php7","purl":"pkg:rpm/suse/php7\u0026distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP3","source":"SUSE-SU-2018:3988-1"},{"ecosystem":"SUSE:Linux Enterprise Software Development Kit 12 SP4","fixed":["5.5.14-109.45.2"],"introduced":["0"],"last_affected":[],"package":"php5","purl":"pkg:rpm/suse/php5\u0026distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP4","source":"SUSE-SU-2018:3995-1"},{"ecosystem":"SUSE:Linux Enterprise Software Development Kit 12 SP4","fixed":["7.0.7-50.56.2"],"introduced":["0"],"last_affected":[],"package":"php7","purl":"pkg:rpm/suse/php7\u0026distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP4","source":"SUSE-SU-2018:3988-1"}],"prev":{"headline":"Memory corruption in n/a","id":"CVE-2018-19517"},"products":["n/a"],"published":"2018-11-25","related":[{"cvss_score":9.8,"headline":"SaltStack Salt Authentication Bypass","id":"CVE-2020-11651","kev_date_added":"2021-11-03","published":"2020-04-30"},{"cvss_score":9.8,"headline":"OpenSMTPD Remote Code Execution","id":"CVE-2020-7247","kev_date_added":"2022-03-25","published":"2020-01-29"},{"cvss_score":9.8,"headline":"Exim Out-of-bounds Write","id":"CVE-2019-16928","kev_date_added":"2022-03-03","published":"2019-09-27"},{"cvss_score":9.8,"headline":"Exim Buffer Overflow","id":"CVE-2018-6789","kev_date_added":"2021-11-03","published":"2018-02-08"},{"cvss_score":9.8,"headline":"Oracle Java SE and Java SE Embedded Remote Code Execution","id":"CVE-2015-2590","kev_date_added":"2022-03-03","published":"2015-07-16"},{"cvss_score":9.8,"headline":"Oracle JRE Remote Code Execution","id":"CVE-2013-0422","kev_date_added":"2022-05-25","published":"2013-01-10"},{"cvss_score":9.8,"headline":"Oracle Java SE Runtime Environment (JRE) Arbitrary Code Execution","id":"CVE-2011-3544","kev_date_added":"2022-03-03","published":"2011-10-19"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"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":["n/a"]},"summary":"Attackers can execute arbitrary OS commands via argument injection in the IMAP Toolkit if rsh is replaced by ssh and server names are untrusted.","url":"https://insights.sbomify.com/CVE-2018-19518/"}