{"answers":{"affected":"4 open source packages ship an affected version, including phpunit/phpunit. It affects 2 products.","exploited":"Yes. Attackers have exploited CVE-2017-9841 in the wild since at least 15 Feb 2022.","fix":"Upgrade phpunit/phpunit to a fixed version for your release line: 4.8.28 or 5.6.3. US federal agencies must fix it by 15 Aug 2022.","what":"CVE-2017-9841 is a critical code injection vulnerability in Oracle Communications Diameter Signaling Router, published on 27 Jun 2017. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2017-9841 and fix it if it is affected.\n\nWhat it is: CVE-2017-9841 is a critical code injection vulnerability in Oracle Communications Diameter Signaling Router, published on 27 Jun 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: Yes. Attackers have exploited CVE-2017-9841 in the wild since at least 15 Feb 2022.\n\nAffected packages and fixed versions:\n- phpunit/phpunit (Packagist): affected from 4.8.19; fixed in 4.8.28\n- phpunit/phpunit (Packagist): affected from 4.8.19; fixed in 4.8.28\n- phpunit/phpunit (Packagist): affected from 5.0.10; fixed in 5.6.3\n- phpunit/phpunit (Packagist): affected from 5.0.10; fixed in 5.6.3\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-2017-9841/ (Markdown: https://insights.sbomify.com/CVE-2017-9841/index.md)","id":"CVE-2017-9841","markdown":"https://insights.sbomify.com/CVE-2017-9841/index.md","name":"CVE-2017-9841","record":{"aliases":["DEBIAN-CVE-2017-9841","GHSA-r7c9-c69m-rph8","UBUNTU-CVE-2017-9841","USN-7171-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"PHPUnit testing library","requires_auth":"none","summary":"Remote attackers can execute arbitrary PHP code if the PHPUnit eval-stdin.php file is exposed via HTTP POST requests.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"communications_diameter_signaling_router","vendor":"oracle"},{"product":"phpunit","vendor":"phpunit_project"}],"cvss":{"score":9.8,"severity":"critical","source":"cisa-adp","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-94","name":"Improper Control of Generation of Code"}],"description":"Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP code via HTTP POST data beginning with a \"\u003c?php \" substring, as demonstrated by an attack on a site with an exposed /vendor folder, i.e., external access to the /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php URI.","ecosystems":["Packagist"],"exploits":{"exploitdb":1,"first_seen":"2020-01-06","github_poc":18,"max_poc_stars":29,"metasploit":0,"nuclei":1,"refs":[{"date":"2020-05-18T20:55:05Z","kind":"github_poc","ref":"https://github.com/RandomRobbieBF/phpunit-brute","stars":29,"title":"Tool to try multiple paths for PHPunit RCE CVE-2017-9841"},{"date":"2021-07-04T16:15:27Z","kind":"github_poc","ref":"https://github.com/incogbyte/laravel-phpunit-rce-masscaner","stars":23,"title":"Masscanner for Laravel phpunit  RCE CVE-2017-9841"},{"date":"2023-08-27T21:20:19Z","kind":"github_poc","ref":"https://github.com/Chocapikk/CVE-2017-9841","stars":7,"title":"PHPUnit RCE"},{"date":"2020-09-14T12:33:44Z","kind":"github_poc","ref":"https://github.com/ludy-dev/PHPUnit_eval-stdin_RCE","stars":6,"title":"(CVE-2017-9841) PHPUnit_eval-stdin_php Remote Code Execution"},{"date":"2022-12-07T11:26:16Z","kind":"github_poc","ref":"https://github.com/MadExploits/PHPunit-Exploit","stars":5,"title":"PHPunit Checker CVE-2017-9841 By MrMad"},{"date":"2025-08-30T12:59:47Z","kind":"github_poc","ref":"https://github.com/drcrypterdotru/PHPUnit-GoScan","stars":5,"title":"PHPUnit CVE-2017-9841 Scanner in Go  clean and fire."},{"date":"2023-03-13T07:42:32Z","kind":"github_poc","ref":"https://github.com/MrG3P5/CVE-2017-9841","stars":4,"title":"A Tool for scanning CVE-2017-9841 with multithread"},{"date":"2022-03-20T07:01:52Z","kind":"github_poc","ref":"https://github.com/akr3ch/CVE-2017-9841","stars":3,"title":"RCE exploit for PHP Unit 5.6.2"}],"tier":"exploited"},"has_fix":true,"headline":"PHPUnit Command Injection","id":"CVE-2017-9841","indexable":true,"kev":{"dateAdded":"2022-02-15","dueDate":"2022-08-15","knownRansomwareCampaignUse":"Unknown","product":"PHPUnit","requiredAction":"Apply updates per vendor instructions.","vendorProject":"PHPUnit","vulnerabilityName":"PHPUnit Command Injection Vulnerability"},"kind":"cve","links":{"ecosystem":"Packagist","product":"oracle:communications_diameter_signaling_router","products":["oracle:communications_diameter_signaling_router"],"type":"code_injection","year":"2017"},"n_packages":4,"n_references":7,"next":{"headline":"Denial of service in n/a","id":"CVE-2017-9843"},"packages":[{"ecosystem":"Packagist","fixed":["4.8.28"],"introduced":["4.8.19"],"last_affected":[],"package":"phpunit/phpunit","purl":null,"source":"GHSA-r7c9-c69m-rph8"},{"ecosystem":"Packagist","fixed":["4.8.28"],"introduced":["4.8.19"],"last_affected":[],"package":"phpunit/phpunit","purl":"pkg:composer/phpunit/phpunit","source":"GHSA-r7c9-c69m-rph8"},{"ecosystem":"Packagist","fixed":["5.6.3"],"introduced":["5.0.10"],"last_affected":[],"package":"phpunit/phpunit","purl":null,"source":"GHSA-r7c9-c69m-rph8"},{"ecosystem":"Packagist","fixed":["5.6.3"],"introduced":["5.0.10"],"last_affected":[],"package":"phpunit/phpunit","purl":"pkg:composer/phpunit/phpunit","source":"GHSA-r7c9-c69m-rph8"}],"prev":{"headline":"Dolibarr ERP and CRM Unsafe File Upload Vulnerability","id":"CVE-2017-9840"},"products":["n/a"],"published":"2017-06-27","related":[{"cvss_score":9.8,"headline":"Auth bypass in WebLogic Server","id":"CVE-2019-2729","kev_date_added":null,"published":"2019-06-19"},{"cvss_score":6.5,"headline":"Information disclosure in Communications Diameter Signaling Router (DSR)","id":"CVE-2019-2399","kev_date_added":null,"published":"2019-01-16"},{"cvss_score":6.1,"headline":"Cross-site scripting in Communications Diameter Signaling Router (DSR)","id":"CVE-2020-14788","kev_date_added":null,"published":"2020-10-21"},{"cvss_score":5.4,"headline":"Cross-site scripting in Communications Diameter Signaling Router (DSR)","id":"CVE-2020-14787","kev_date_added":null,"published":"2020-10-21"}],"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":"open","licence":"CC0 1.0","name":"CISA KEV"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"active","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-10-21","vendors":["n/a"]},"summary":"Remote attackers can execute arbitrary PHP code if the PHPUnit eval-stdin.php file is exposed via HTTP POST requests.","url":"https://insights.sbomify.com/CVE-2017-9841/"}