{"answers":{"affected":"2 open source packages ship an affected version, including basic-ftp. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-39983 exists.","fix":"Upgrade basic-ftp to 5.2.1 or later.","what":"CVE-2026-39983 is a high-severity command injection vulnerability in patrickjuchli basic-ftp, published on 9 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-39983 and fix it if it is affected.\n\nWhat it is: CVE-2026-39983 is a high-severity command injection vulnerability in patrickjuchli basic-ftp, published on 9 Apr 2026. 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-2026-39983 exists.\n\nAffected packages and fixed versions:\n- basic-ftp (npm): affected from 5.2.0; fixed in 5.2.1\n- basic-ftp (npm): affected from 5.2.0; fixed in 5.2.1\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-2026-39983/ (Markdown: https://insights.sbomify.com/CVE-2026-39983/index.md)","id":"CVE-2026-39983","markdown":"https://insights.sbomify.com/CVE-2026-39983/index.md","name":"CVE-2026-39983","record":{"aliases":["CLEANSTART-2026-CT42471","CLEANSTART-2026-KA05451","DEBIAN-CVE-2026-39983","GHSA-chqc-8p9q-pq6q","MINI-2hhf-8934-jfg5","MINI-6pjw-354j-8hqx","MINI-7xw3-2vm2-r8wf","MINI-fxgh-jj6j-wx9w","MINI-g664-hjqv-cg69","MINI-g7fm-p282-724x","MINI-h8cv-p5mg-54cv","MINI-j86q-g53g-84rm","MINI-pwfh-995x-mfhp","MINI-vmpv-3v76-jw22","ROOT-APP-NPM-CVE-2026-39983","UBUNTU-CVE-2026-39983"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Node.js FTP client","requires_auth":"none","summary":"Attacker can inject arbitrary FTP commands via CRLF sequences in file paths, potentially executing code or modifying data.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"basic-ftp","vendor":"patrickjuchli"}],"cvss":{"score":8.6,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L","version":"3.1"},"cwes":[{"id":"CWE-93","name":"Improper Neutralization of CRLF Sequences"}],"description":"basic-ftp is an FTP client for Node.js. Prior to 5.2.1, basic-ftp allows FTP command injection via CRLF sequences (\\r\\n) in file path parameters passed to high-level path APIs such as cd(), remove(), rename(), uploadFrom(), downloadTo(), list(), and removeDir(). The library's protectWhitespace() helper only handles leading spaces and returns other paths unchanged, while FtpContext.send() writes the resulting command string directly to the control socket with \\r\\n appended. This lets attacker-controlled path strings split one intended FTP command into multiple commands. This vulnerability is fixed in 5.2.1.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":"2026-04-10","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-04-10T15:11:48Z","kind":"github_poc","ref":"https://github.com/zebbernCVE/CVE-2026-39983","stars":0,"title":"Advisory for basic-ftp ⌯⌲ 20 mill weekly downloads"}],"tier":"weaponised"},"has_fix":true,"headline":"FTP Command Injection via CRLF in basic-ftp","id":"CVE-2026-39983","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"command_injection","year":"2026"},"n_packages":2,"n_references":3,"next":{"headline":"Sigstore Timestamp Authority has Improper Certificate Validation in verifier","id":"CVE-2026-39984"},"packages":[{"ecosystem":"npm","fixed":["5.2.1"],"introduced":["5.2.0"],"last_affected":[],"package":"basic-ftp","purl":null,"source":"GHSA-chqc-8p9q-pq6q"},{"ecosystem":"npm","fixed":["5.2.1"],"introduced":["5.2.0"],"last_affected":[],"package":"basic-ftp","purl":"pkg:npm/basic-ftp","source":"GHSA-chqc-8p9q-pq6q"}],"prev":{"headline":"AGiXT has a Path Traversal in safe_join()","id":"CVE-2026-39981"},"products":["basic-ftp"],"published":"2026-04-09","related":[{"cvss_score":9.1,"headline":"Basic FTP has Path Traversal Vulnerability in its downloadToDir() method","id":"CVE-2026-27699","kev_date_added":null,"published":"2026-02-25"},{"cvss_score":7.5,"headline":"basic-ftp vulnerable to denial of service via unbounded memory consumption in Client.list()","id":"CVE-2026-41324","kev_date_added":null,"published":"2026-04-24"}],"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":"partial"},"state":"PUBLISHED","updated":"2026-07-15","vendors":["patrickjuchli"]},"summary":"Attacker can inject arbitrary FTP commands via CRLF sequences in file paths, potentially executing code or modifying data.","url":"https://insights.sbomify.com/CVE-2026-39983/"}