Repository navigation
Override basic-ftp to ^6.2.1 (GHSA-c475-qrg2-pj4r) - #8086
Merged
Merged
Conversation
get-uri still depends on basic-ftp ^5.x, which has no patched release.
code-asher
approved these changes
Oct 28, 2026
code-asher
left a comment
Member
There was a problem hiding this comment.
Thank you! I see upstream has already bumped basic-ftp but looks like no new version yet, so overriding in the meantime makes sense to me.
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.
Fixes #8078
basic-ftp<= 6.2.0 is affected by GHSA-c475-qrg2-pj4r (quadratic-time regex backtracking in the Unix listing parser used byClient.list()), fixed in 6.2.1. code-server only gets it transitively (proxy-agent->pac-proxy-agent->get-uri->basic-ftp), and the newestget-uri(8.0.1) still depends onbasic-ftp@^5.3.1, so a plain lockfile refresh can't reach a patched release.This adds an
overridesentry ("basic-ftp": "^6.2.1") and updatespackage-lock.json, which movesbasic-ftpfrom 5.3.1 to 6.2.3. The lockfile diff is only thebasic-ftpentry.Compatibility:
get-urionly usesnew Client(),access,lastMod,list,downloadToandclose, all still present in 6.x. The one 6.0.0 breaking change is that separate transfer hosts are rejected by default (FTP bounce protection, https://github.com/patrickjuchli/basic-ftp/releases/tag/v6.0.0). It only affects an FTP server whose PASV reply names a different host than the control connection. Hereget-uriis only reached when a PAC script fetches anftp:URL for a proxy config, so I expect the impact to be negligible.Testing:
npm ciaccepts the lockfile,npm ls basic-ftpshowsget-uri -> basic-ftp@6.2.3 overridden, and a local fake FTP server (USER/PASS/MDTM/PASV/RETR) served a file throughget-uri'sftp:handler with the override applied.