# CVE-2026-39983: FTP Command Injection via CRLF in basic-ftp

- Severity: High 8.6 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.27%, higher than 83% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-08T20:02:25.000Z
- Modified: 2026-10-26T22:10:00.163Z
- Also known as: GHSA-chqc-8p9q-pq6q
- Weaknesses: CWE-93
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- patrickjuchli basic-ftp: < 5.2.1; before 5.2.1
- rhdh/rhdh-hub-rhel9: no versions given (not affected: from 1776784286 before *; from 1777903262 before *)
- rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9: no versions given
- redhat-user-workloads/art-images: no versions given
- redhat-user-workloads/ansible-plugins: no versions given
- basic-ftp (npm): from 5.2.0 before 5.2.1

## Every score

- GitHub_M: CVSS:3.1 8.6 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L`
- redhat-SADP: CVSS:3.1 8.6 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L`
- GitHub: CVSS:3.1 8.6 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L`

## References

- <https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-chqc-8p9q-pq6q> (exploit, mitigation, vendor-advisory, web)
- <https://github.com/patrickjuchli/basic-ftp/commit/2ecc8e2c500c5234115f06fd1dbde1aa03d70f4b> (patch, web)
- <https://github.com/patrickjuchli/basic-ftp/releases/tag/v5.2.1> (product, release-notes, web)
- <https://access.redhat.com/security/cve/CVE-2026-39983> (vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2456971> (issue-tracking)
- <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-39983.json>
- <https://access.redhat.com/errata/RHSA-2026:9742> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:13826> (vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-39983> (advisory)
- <https://github.com/patrickjuchli/basic-ftp> (package)

## Sources

- CVE List: [CVE-2026-39983](https://www.cve.org/CVERecord?id=CVE-2026-39983), CVE Terms of Use, modified 2026-07-15
- GitHub Advisory Database: [GHSA-chqc-8p9q-pq6q](https://github.com/advisories/GHSA-chqc-8p9q-pq6q), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-39983](https://nvd.nist.gov/vuln/detail/CVE-2026-39983), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-39983 · Whole record: https://cve.day/CVE-2026-39983.json · Rebuilt by cve.day 2026-11-25T22:59:18.393Z
