Conversation
Copilot
AI
changed the title
[WIP] Fix path traversal vulnerability in basic-ftp
Bump transitive Apr 16, 2026
basic-ftp to a patched version to remediate CVE-2026-27699
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dependabot flagged
basic-ftpfor a critical path traversal vulnerability indownloadToDir()(GHSA-5rq4-664w-9x2c / CVE-2026-27699). The vulnerable version (5.0.5) was present transitively via proxy dependencies.What changed
basic-ftpfrom5.0.5to5.3.0(patched range is>=5.2.0).Dependency path affected
@mongodb-js/devtools-proxy-support→pac-proxy-agent→get-uri→basic-ftpReachability Assessment
basic-ftp’sdownloadToDir()API.get-uri) usesclient.downloadTo(...), notdownloadToDir().Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
example.com/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/devtools-shared/devtools-shared/node_modules/.bin/mocha -gyp sh k/_t�� . che/node-gyp/24.. bin/sh dn't have any #inode -I ode-gyp-bin/noderun prettier --ch�� . ures/include d/packages/node_modules/.bin/node --runtime napi bash -I ode-gyp-bin/sh node(dns block)example.net/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/devtools-shared/devtools-shared/node_modules/.bin/mocha -gyp sh k/_t�� . che/node-gyp/24.. bin/sh dn't have any #inode -I ode-gyp-bin/noderun prettier --ch�� . ures/include d/packages/node_modules/.bin/node --runtime napi bash -I ode-gyp-bin/sh node(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details the Dependabot vulnerability alert you should resolve
<alert_title>Basic FTP has Path Traversal Vulnerability in its downloadToDir() method</alert_title>
<alert_description>The
basic-ftplibrary contains a path traversal vulnerability in thedownloadToDir()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:707Root Cause:
- Parser validation (
parseListUnix.ts:101) only filters exact.or..entries- No sanitization of
../sequences in filenamespath.join()doesn't prevent traversal,fs.open()resolves pathsImpact
A malicious FTP server can:
- Write files to arbitrary locations on the client filesystem
- Overwrite critical system files (if user has write access)
- Potentially achieve remote code execution
Affected Versions
Mitigation
Workaround: Do not use
downloadToDir()with untrusted FTP servers.Fix: Sanitize filenames before use: