{"answers":{"affected":"2 open source packages ship an affected version, including phpmailer/phpmailer. It affects 3 products.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2016-10045 exists.","fix":"Upgrade phpmailer/phpmailer to 5.2.20 or later.","what":"CVE-2016-10045 is a critical command injection vulnerability in Joomla Joomla\\!, published on 30 Dec 2016. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2016-10045 and fix it if it is affected.\n\nWhat it is: CVE-2016-10045 is a critical command injection vulnerability in Joomla Joomla\\!, published on 30 Dec 2016. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2016-10045 exists.\n\nAffected packages and fixed versions:\n- phpmailer/phpmailer (Packagist): affected from 5.0.0; fixed in 5.2.20\n- phpmailer/phpmailer (Packagist): affected from 5.0.0; fixed in 5.2.20\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-2016-10045/ (Markdown: https://insights.sbomify.com/CVE-2016-10045/index.md)","id":"CVE-2016-10045","markdown":"https://insights.sbomify.com/CVE-2016-10045/index.md","name":"CVE-2016-10045","record":{"aliases":["ALPINE-CVE-2016-10045","GHSA-4pc3-96mx-wwc8","UBUNTU-CVE-2016-10045"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"PHPMailer library","requires_auth":"none","summary":"Remote attackers can execute arbitrary code via command injection in PHPMailer's mail transport due to improper escaping.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"joomla\\!","vendor":"joomla"},{"product":"phpmailer","vendor":"phpmailer_project"},{"product":"wordpress","vendor":"wordpress"}],"cvss":{"score":9.8,"severity":"critical","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"description":"The isMail transport in PHPMailer before 5.2.20 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code by leveraging improper interaction between the escapeshellarg function and internal escaping performed in the mail function in PHP. NOTE: this vulnerability exists because of an incorrect fix for CVE-2016-10033.","ecosystems":["Packagist"],"exploits":{"exploitdb":3,"first_seen":"2016-12-26","github_poc":0,"max_poc_stars":null,"metasploit":1,"nuclei":0,"refs":[{"date":"2016-12-26","kind":"metasploit","ref":"exploit/multi/http/phpmailer_arg_injection","stars":null,"title":"PHPMailer Sendmail Argument Injection"},{"date":"2016-12-27","kind":"exploitdb","ref":"40969","stars":null,"title":"PHPMailer \u003c 5.2.20 - Remote Code Execution"},{"date":"2017-01-02","kind":"exploitdb","ref":"40986","stars":null,"title":"PHPMailer \u003c 5.2.20 / SwiftMailer \u003c 5.4.5-DEV / Zend Framework / zend-mail \u003c 2.4.11 - 'AIO' 'PwnScriptum' Remote Code Execution"},{"date":"2017-06-21","kind":"exploitdb","ref":"42221","stars":null,"title":"PHPMailer \u003c 5.2.20 with Exim MTA - Remote Code Execution"}],"tier":"weaponised"},"has_fix":true,"headline":"Remote code execution in PHPMailer","id":"CVE-2016-10045","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":"joomla:joomla\\!","products":["joomla:joomla\\!","wordpress:wordpress"],"type":"command_injection","year":"2016"},"n_packages":2,"n_references":15,"next":{"headline":"Memory corruption in n/a","id":"CVE-2016-10046"},"packages":[{"ecosystem":"Packagist","fixed":["5.2.20"],"introduced":["5.0.0"],"last_affected":[],"package":"phpmailer/phpmailer","purl":null,"source":"GHSA-4pc3-96mx-wwc8"},{"ecosystem":"Packagist","fixed":["5.2.20"],"introduced":["5.0.0"],"last_affected":[],"package":"phpmailer/phpmailer","purl":"pkg:composer/phpmailer/phpmailer","source":"GHSA-4pc3-96mx-wwc8"}],"prev":{"headline":"Privilege escalation in n/a","id":"CVE-2016-10044"},"products":["n/a"],"published":"2016-12-30","related":[{"cvss_score":9.8,"headline":"PHPMailer Command Injection","id":"CVE-2016-10033","kev_date_added":"2025-07-07","published":"2016-12-30"},{"cvss_score":5.3,"headline":"Joomla! Improper Access Control","id":"CVE-2023-23752","kev_date_added":"2024-01-08","published":"2023-02-16"},{"cvss_score":9.8,"headline":"Joomla! Core - [20260518] - Transport encryption downgrade for password and username reset links","id":"CVE-2026-48902","kev_date_added":null,"published":"2026-05-26"},{"cvss_score":9.8,"headline":"[20250401] - Joomla Framework - SQL injection vulnerability in quoteNameStr method of Database package","id":"CVE-2025-25226","kev_date_added":null,"published":"2025-04-08"},{"cvss_score":9.8,"headline":"[20220303] - Core - User row are not bound to a authentication mechanism","id":"CVE-2022-23795","kev_date_added":null,"published":"2022-03-30"},{"cvss_score":9.8,"headline":"[20220305] - Core - Inadequate filtering on the selected Ids","id":"CVE-2022-23797","kev_date_added":null,"published":"2022-03-30"},{"cvss_score":9.8,"headline":"[20220307] - Core - Variable Tampering on JInput $_REQUEST data","id":"CVE-2022-23799","kev_date_added":null,"published":"2022-03-30"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"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"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-06","vendors":["n/a"]},"summary":"Remote attackers can execute arbitrary code via command injection in PHPMailer's mail transport due to improper escaping.","url":"https://insights.sbomify.com/CVE-2016-10045/"}