{"answers":{"affected":"5 open source packages ship an affected version, including github.com/projectdiscovery/nuclei/v3, github.com/projectdiscovery/nuclei and github.com/projectdiscovery/nuclei/v2.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-40641 exists.","fix":"Upgrade github.com/projectdiscovery/nuclei/v3 to 3.3.0 or later.","what":"CVE-2024-40641 is a high-severity command injection vulnerability in projectdiscovery nuclei, published on 17 Jul 2024. 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-2024-40641 and fix it if it is affected.\n\nWhat it is: CVE-2024-40641 is a high-severity command injection vulnerability in projectdiscovery nuclei, published on 17 Jul 2024. 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-2024-40641 exists.\n\nAffected packages and fixed versions:\n- github.com/projectdiscovery/nuclei/v3 (Go): affected all versions; fixed in 3.3.0\n- github.com/projectdiscovery/nuclei/v3 (Go): affected all versions; fixed in 3.3.0\n- github.com/projectdiscovery/nuclei/v3 (Go): affected all versions; fixed in 3.3.0\n- github.com/projectdiscovery/nuclei (Go): affected all versions; no fix listed\n- github.com/projectdiscovery/nuclei/v2 (Go): affected all versions; no fix listed\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-2024-40641/ (Markdown: https://insights.sbomify.com/CVE-2024-40641/index.md)","id":"CVE-2024-40641","markdown":"https://insights.sbomify.com/CVE-2024-40641/index.md","name":"CVE-2024-40641","record":{"aliases":["GHSA-c3q9-c27p-cw9h","GO-2024-2989"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Vulnerability scanner","requires_auth":"none","summary":"Attackers can execute arbitrary commands by bypassing signature checks in Nuclei workflows, affecting tools that integrate this scanner.","user_interaction":"required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":7.4,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"description":"Nuclei is a fast and customizable vulnerability scanner based on simple YAML based DSL.  In affected versions it a way to execute code template without -code option and signature has been discovered. Some web applications inherit from Nuclei and allow users to edit and execute workflow files. In this case, users can execute arbitrary commands. (Although, as far as I know, most web applications use -t to execute). This issue has been addressed in version 3.3.0. Users are advised to upgrade. There are no known workarounds for this vulnerability.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Unsigned code template execution through workflows in projectdiscovery/nuclei","id":"CVE-2024-40641","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"command_injection","year":"2024"},"n_packages":5,"n_references":1,"next":{"headline":"Absent Input Validation in BinaryHttpParser in the netty incubator codec.bhttp","id":"CVE-2024-40642"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/projectdiscovery/nuclei","purl":"pkg:golang/github.com/projectdiscovery/nuclei","source":"GO-2024-2989"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/projectdiscovery/nuclei/v2","purl":"pkg:golang/github.com/projectdiscovery/nuclei/v2","source":"GO-2024-2989"},{"ecosystem":"Go","fixed":["3.3.0"],"introduced":["0"],"last_affected":[],"package":"github.com/projectdiscovery/nuclei/v3","purl":null,"source":"GHSA-c3q9-c27p-cw9h"},{"ecosystem":"Go","fixed":["3.3.0"],"introduced":["0"],"last_affected":[],"package":"github.com/projectdiscovery/nuclei/v3","purl":"pkg:golang/github.com/projectdiscovery/nuclei/v3","source":"GHSA-c3q9-c27p-cw9h"},{"ecosystem":"Go","fixed":["3.3.0"],"introduced":["0"],"last_affected":[],"package":"github.com/projectdiscovery/nuclei/v3","purl":"pkg:golang/github.com/projectdiscovery/nuclei/v3","source":"GO-2024-2989"}],"prev":{"headline":"Usage of non-constant time base64 decoder could lead to leakage of secret key material in vodozemac","id":"CVE-2024-40640"},"products":["nuclei"],"published":"2024-07-17","related":[],"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":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-13","vendors":["projectdiscovery"]},"summary":"Attackers can execute arbitrary commands by bypassing signature checks in Nuclei workflows, affecting tools that integrate this scanner.","url":"https://insights.sbomify.com/CVE-2024-40641/"}