Security Digest · Vulnerability record

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

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.

CVSS 9.1 Critical EPSS 1.0% · p63

Should you act?

Critical and remotely reachable

No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
  • EPSS 1.0%, percentile 63: FIRST’s model estimates a 1.0% chance of exploitation activity in the next 30 days, higher than 63% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
  • Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
  • Only applies if your dependency tree includes basic-ftp (npm) < 5.2.0, fixed in 5.2.0. Check your lockfile, including transitive dependencies.

What it is

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.

From the GitHub advisory

The basic-ftp library contains a path traversal vulnerability 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.

Source-to-Sink Flow

Vulnerable Code

File: src/Client.ts:707

Root Cause: - Parser validation (parseListUnix.ts:101) only filters exact . or .. entries - No sanitization of ../ sequences in filenames - path.join() doesn't prevent traversal, fs.open() resolves paths

Weakness type: CWE-22.

Product: basic-ftp (npm) · Assigned by: GitHub_M · Published: 2026-02-25

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
npmbasic-ftp< 5.2.05.2.0
VendorProductAffected versions (per CVE record)
patrickjuchlibasic-ftp< 5.2.0

Severity scores

Scored byCVSSScoreVector
GitHub_M3.19.1 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
GitHub3.19.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Privileges required: none (no login)
  • User interaction: none
  • Scope: unchanged

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation poc, automatable yes, technical impact total.
  • FIRST EPSS (model of 2026-10-21): 1.03% probability of exploitation activity in the next 30 days; percentile 63.

Timeline

  • — CVE record published by GitHub_M
  • — GitHub-reviewed advisory GHSA-5rq4-664w-9x2c published (critical)
  • — CVE record last updated

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-5rq4-664w-9x2c github.com
  2. CVE.org record CVE-2026-27699 cve.org
  3. NVD entry CVE-2026-27699 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com
  2. github.com github.com
  3. github.com github.com

Critical npm advisories · Today’s Security Digest