{"answers":{"affected":"10 open source packages ship an affected version, including react-dev-utils. It affects 1 product.","exploited":"There is no known exploitation of CVE-2018-6342 in the wild and no public exploit code.","fix":"Upgrade react-dev-utils to a fixed version for your release line: 1.0.4, 2.0.2, 3.1.2 or 4.2.2.","what":"CVE-2018-6342 is a critical command injection vulnerability in Facebook react-dev-utils, published on 31 Dec 2018. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2018-6342 and fix it if it is affected.\n\nWhat it is: CVE-2018-6342 is a critical command injection vulnerability in Facebook react-dev-utils, published on 31 Dec 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2018-6342 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- react-dev-utils (npm): affected from 1.0.0; fixed in 1.0.4\n- react-dev-utils (npm): affected from 1.0.0; fixed in 1.0.4\n- react-dev-utils (npm): affected from 2.0.0; fixed in 2.0.2\n- react-dev-utils (npm): affected from 2.0.0; fixed in 2.0.2\n- react-dev-utils (npm): affected from 3.0.0; fixed in 3.1.2\n- react-dev-utils (npm): affected from 3.0.0; fixed in 3.1.2\n- react-dev-utils (npm): affected from 4.0.0; fixed in 4.2.2\n- react-dev-utils (npm): affected from 4.0.0; fixed in 4.2.2\n- react-dev-utils (npm): affected from 5.0.0; fixed in 5.0.2\n- react-dev-utils (npm): affected from 5.0.0; fixed in 5.0.2\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-6342/ (Markdown: https://insights.sbomify.com/CVE-2018-6342/index.md)","id":"CVE-2018-6342","markdown":"https://insights.sbomify.com/CVE-2018-6342/index.md","name":"CVE-2018-6342","record":{"aliases":["GHSA-29gp-92wp-94q8"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"React development utility","requires_auth":"none","summary":"An attacker can execute arbitrary commands on a developer's Windows machine by sending unsanitized requests to the local react-dev-utils server.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"facebook","cpe":[{"product":"react-dev-utils","vendor":"facebook"}],"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-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"description":"react-dev-utils on Windows allows developers to run a local webserver for accepting various commands, including a command to launch an editor. The input to that command was not properly sanitized, allowing an attacker who can make a network request to the server (either via CSRF or by direct request) to execute arbitrary commands on the targeted system. This issue affects multiple branches: 1.x.x prior to 1.0.4, 2.x.x prior to 2.0.2, 3.x.x prior to 3.1.2, 4.x.x prior to 4.2.2, and 5.x.x prior to 5.0.2.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"react-dev-utils on Windows vulnerable to Remote Code Execution","id":"CVE-2018-6342","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"command_injection","year":"2018"},"n_packages":10,"n_references":2,"next":{"headline":"Proxygen fails to validate that a secondary auth manager is set before dereferencing it.","id":"CVE-2018-6343"},"packages":[{"ecosystem":"npm","fixed":["1.0.4"],"introduced":["1.0.0"],"last_affected":[],"package":"react-dev-utils","purl":null,"source":"GHSA-29gp-92wp-94q8"},{"ecosystem":"npm","fixed":["1.0.4"],"introduced":["1.0.0"],"last_affected":[],"package":"react-dev-utils","purl":"pkg:npm/react-dev-utils","source":"GHSA-29gp-92wp-94q8"},{"ecosystem":"npm","fixed":["2.0.2"],"introduced":["2.0.0"],"last_affected":[],"package":"react-dev-utils","purl":null,"source":"GHSA-29gp-92wp-94q8"},{"ecosystem":"npm","fixed":["2.0.2"],"introduced":["2.0.0"],"last_affected":[],"package":"react-dev-utils","purl":"pkg:npm/react-dev-utils","source":"GHSA-29gp-92wp-94q8"},{"ecosystem":"npm","fixed":["3.1.2"],"introduced":["3.0.0"],"last_affected":[],"package":"react-dev-utils","purl":null,"source":"GHSA-29gp-92wp-94q8"},{"ecosystem":"npm","fixed":["3.1.2"],"introduced":["3.0.0"],"last_affected":[],"package":"react-dev-utils","purl":"pkg:npm/react-dev-utils","source":"GHSA-29gp-92wp-94q8"},{"ecosystem":"npm","fixed":["4.2.2"],"introduced":["4.0.0"],"last_affected":[],"package":"react-dev-utils","purl":null,"source":"GHSA-29gp-92wp-94q8"},{"ecosystem":"npm","fixed":["4.2.2"],"introduced":["4.0.0"],"last_affected":[],"package":"react-dev-utils","purl":"pkg:npm/react-dev-utils","source":"GHSA-29gp-92wp-94q8"},{"ecosystem":"npm","fixed":["5.0.2"],"introduced":["5.0.0"],"last_affected":[],"package":"react-dev-utils","purl":null,"source":"GHSA-29gp-92wp-94q8"},{"ecosystem":"npm","fixed":["5.0.2"],"introduced":["5.0.0"],"last_affected":[],"package":"react-dev-utils","purl":"pkg:npm/react-dev-utils","source":"GHSA-29gp-92wp-94q8"}],"prev":{"headline":"Cross-Site Scripting in react-dom","id":"CVE-2018-6341"},"products":["react-dev-utils"],"published":"2018-12-31","related":[{"cvss_score":5.6,"headline":"react-dev-utils OS Command Injection in function `getProcessForPort`","id":"CVE-2021-24033","kev_date_added":null,"published":"2021-03-09"}],"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)"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-05-06","vendors":["Facebook"]},"summary":"An attacker can execute arbitrary commands on a developer's Windows machine by sending unsanitized requests to the local react-dev-utils server.","url":"https://insights.sbomify.com/CVE-2018-6342/"}