Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-27699

CVE-2026-27699: Basic-ftp Path Traversal Vulnerability

CVE-2026-27699 is a path traversal flaw in basic-ftp for Node.js that allows malicious FTP servers to write files outside the intended directory. This post covers technical details, affected versions, and patches.

Published: February 27, 2026

CVE-2026-27699 Overview

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. This vulnerability allows attackers controlling a malicious FTP server to write arbitrary files to locations outside the designated download directory on the client system.

Critical Impact

Malicious FTP servers can exploit this path traversal flaw to write files anywhere on the client filesystem, potentially leading to remote code execution, configuration tampering, or complete system compromise.

Affected Products

  • patrickjuchli basic-ftp versions prior to 5.2.0
  • Node.js applications using vulnerable basic-ftp package
  • Any service or application integrating basic-ftp for FTP downloads

Discovery Timeline

  • 2026-02-25 - CVE CVE-2026-27699 published to NVD
  • 2026-02-26 - Last updated in NVD database

Technical Details for CVE-2026-27699

Vulnerability Analysis

This path traversal vulnerability exists in the downloadToDir() method of the basic-ftp library. When a client connects to an FTP server and downloads files, the server provides a directory listing containing filenames. In vulnerable versions, the library does not properly validate or sanitize these filenames before using them to construct file paths on the local filesystem.

An attacker operating a malicious FTP server can craft directory listings containing filenames with path traversal sequences such as ../../../etc/cron.d/malicious or ../../../home/user/.bashrc. When the client processes these listings, the tainted filenames are concatenated directly with the target download directory, causing files to be written to arbitrary locations outside the intended directory.

Root Cause

The root cause is improper input validation of filenames received from the FTP server before they are used in filesystem operations. The vulnerable code directly joins the server-provided filename with the local download path using join() without first stripping or validating the filename component. The fix introduces the use of basename() to extract only the filename portion, effectively neutralizing any path traversal sequences.

Attack Vector

The attack requires the victim to connect to a malicious FTP server controlled by the attacker. This could occur through:

  1. Social engineering users to connect to a malicious server
  2. Compromising DNS to redirect FTP connections
  3. Man-in-the-middle attacks on unencrypted FTP connections
  4. Supplying malicious FTP server URLs in configuration or user input

Once connected, the malicious server responds to directory listing requests with crafted filenames containing ../ sequences. When the victim's application calls downloadToDir(), files are written outside the intended directory.

typescript
import { createReadStream, createWriteStream, mkdir, readdir, stat, open, close, unlink } from "fs"
-import { join } from "path"
+import { basename, join } from "path"
import { Readable, Writable } from "stream"
import { connect as connectTLS, ConnectionOptions as TLSConnectionOptions } from "tls"
import { promisify } from "util"

Source: GitHub Commit 2a2a0e6

The patch imports basename from the path module to sanitize filenames by extracting only the base filename component, stripping any directory path sequences including traversal attempts.

Detection Methods for CVE-2026-27699

Indicators of Compromise

  • Unexpected files appearing in system directories outside of designated FTP download locations
  • Files with suspicious names or content in sensitive directories like /etc/cron.d/, user home directories, or application config paths
  • FTP connection logs showing connections to unfamiliar or suspicious FTP servers
  • Application logs showing downloads of files with ../ sequences in their names

Detection Strategies

  • Scan package.json and package-lock.json files for basic-ftp dependencies with versions below 5.2.0
  • Implement software composition analysis (SCA) tools to identify vulnerable npm packages in CI/CD pipelines
  • Monitor file creation events for paths that contain traversal patterns originating from FTP client processes
  • Use endpoint detection to identify file writes outside expected directories during FTP operations

Monitoring Recommendations

  • Enable file integrity monitoring on critical system directories and configuration files
  • Log all FTP connections including destination servers, transferred filenames, and local write paths
  • Alert on basic-ftp library usage in production environments until patching is confirmed
  • Monitor for anomalous file creation patterns in system directories that correlate with FTP activity

How to Mitigate CVE-2026-27699

Immediate Actions Required

  • Update the basic-ftp package to version 5.2.0 or later immediately
  • Audit applications for usage of the downloadToDir() method with untrusted FTP servers
  • Review filesystem permissions to limit write access from application processes
  • Consider temporarily disabling FTP download functionality in production until patched

Patch Information

The vulnerability is fixed in basic-ftp version 5.2.0. The patch introduces proper filename sanitization using basename() to prevent path traversal attacks. For detailed patch information, see the GitHub Release v5.2.0 and the GitHub Security Advisory GHSA-5rq4-664w-9x2c.

Workarounds

  • Validate and sanitize all filenames received from FTP servers before writing to disk if patching is not immediately possible
  • Implement application-level filename validation to reject any filename containing ../ or absolute paths
  • Use chroot or containerization to limit filesystem access for FTP client processes
  • Only connect to trusted, known FTP servers until the library is updated
bash
# Update basic-ftp to patched version
npm update basic-ftp@5.2.0

# Verify installed version
npm list basic-ftp

# Audit for vulnerabilities
npm audit

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechPatrickjuchli Basic Ftp

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-22
  • Technical References
  • GitHub Release v5.2.0
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-5rq4-664w-9x2c
  • Latest CVEs
  • CVE-2025-49454: TinySalt Path Traversal Vulnerability

  • CVE-2025-48261: MultiVendorX Information Disclosure Flaw

  • CVE-2025-32119: CardGate WooCommerce SQL Injection Flaw

  • CVE-2025-26879: s2Member Plugin Reflected XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English