{"answers":{"affected":"2 open source packages ship an affected version, including hfs. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-39943 exists.","fix":"Upgrade hfs to 0.52.10 or later.","what":"CVE-2024-39943 is a critical command injection vulnerability in n/a, published on 4 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-39943 and fix it if it is affected.\n\nWhat it is: CVE-2024-39943 is a critical command injection vulnerability in n/a, published on 4 Jul 2024. 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-2024-39943 exists.\n\nAffected packages and fixed versions:\n- hfs (npm): affected all versions; fixed in 0.52.10\n- hfs (npm): affected all versions; fixed in 0.52.10\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-39943/ (Markdown: https://insights.sbomify.com/CVE-2024-39943/index.md)","id":"CVE-2024-39943","markdown":"https://insights.sbomify.com/CVE-2024-39943/index.md","name":"CVE-2024-39943","record":{"aliases":["GHSA-5f4x-hwv2-w9w2"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"HTTP File Server","requires_auth":"low_privilege","summary":"Remote authenticated users with upload permissions can execute OS commands via shell execution of df in HFS.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"http_file_server","vendor":"rejetto"}],"cvss":{"score":9.9,"severity":"critical","source":"cna","vector":"CVSS:3.1/AC:L/AV:N/A:H/C:H/I:H/PR:L/S:C/UI:N","version":"3.1"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"},{"id":"CWE-284","name":"Improper Access Control"}],"description":"rejetto HFS (aka HTTP File Server) 3 before 0.52.10 on Linux, UNIX, and macOS allows OS command execution by remote authenticated users (if they have Upload permissions). This occurs because a shell is used to execute df (i.e., with execSync instead of spawnSync in child_process in Node.js).","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":"2024-07-05","github_poc":2,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2024-07-05T07:39:52Z","kind":"github_poc","ref":"https://github.com/Heyholiday067/CVE-2024-39943-Poc","stars":0,"title":"CVE-2024-39943 rejetto HFS (aka HTTP File Server) 3 before 0.52.10 on Linux, UNIX, and macOS allows OS command execution by remote authenticated users (if they have Upload permissions). This occurs because a shell is used to execute df (i.e., with execSync instead of spawnSync in child_process in Node.js)."},{"date":"2025-04-19T06:06:14Z","kind":"github_poc","ref":"https://github.com/JenmrR/Node.js-CVE-2024-39943","stars":0,"title":null}],"tier":"weaponised"},"has_fix":true,"headline":"rejetto HFS vulnerable to OS Command Execution by remote authenticated users","id":"CVE-2024-39943","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"command_injection","year":"2024"},"n_packages":2,"n_references":3,"next":{"headline":"Denial of service in IPC-HX8XXX and NVR4XXX","id":"CVE-2024-39944"},"packages":[{"ecosystem":"npm","fixed":["0.52.10"],"introduced":["0"],"last_affected":[],"package":"hfs","purl":null,"source":"GHSA-5f4x-hwv2-w9w2"},{"ecosystem":"npm","fixed":["0.52.10"],"introduced":["0"],"last_affected":[],"package":"hfs","purl":"pkg:npm/hfs","source":"GHSA-5f4x-hwv2-w9w2"}],"prev":{"headline":"supOS 5.0 allows api/image/download?fileName=../ directory traversal for reading files.","id":"CVE-2024-39937"},"products":["n/a"],"published":"2024-07-04","related":[{"cvss_score":9.8,"headline":"Rejetto HTTP File Server Improper Neutralization of Special Elements Used in a Template Engine","id":"CVE-2024-23692","kev_date_added":"2024-07-09","published":"2024-05-31"},{"cvss_score":9.8,"headline":"Rejetto HTTP File Server (HFS) Remote Code Execution","id":"CVE-2014-6287","kev_date_added":"2022-03-25","published":"2014-10-07"},{"cvss_score":7.5,"headline":"Memory corruption in n/a","id":"CVE-2020-13432","kev_date_added":null,"published":"2020-06-08"},{"cvss_score":7.5,"headline":"Code injection in n/a","id":"CVE-2014-7226","kev_date_added":null,"published":"2014-10-10"}],"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":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["n/a"]},"summary":"Remote authenticated users with upload permissions can execute OS commands via shell execution of df in HFS.","url":"https://insights.sbomify.com/CVE-2024-39943/"}