Skip to content

build(deps): bump ssh2-sftp-client from 12.1.1 to 13.0.1 - #327

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bun/ssh2-sftp-client-13.0.1
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bun/ssh2-sftp-client-13.0.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Dec 5, 2026

Copy link
Copy Markdown
Contributor

Bumps ssh2-sftp-client from 12.1.1 to 13.0.1.

Release notes

Sourced from ssh2-sftp-client's releases.

Security bug fix

A security issue in the downloadDir() method was identified by kochoi95. The vulnerability could allow a malicious remote sftp server write arbitrary data to a location outside the destination directory set in a call to downloadDir() by returning filenames with special characters i.e. '../' and './'. The problem was that the filenames returned by the call to the remote server's ls method were joined onto the destination directory path without sanitisation and escaping of characters with special meanings in directory paths, such as '..', '.' and '/'.

For an attacker to use this exploit, they must first get the client to connect to a malicious sftp server which will return the dangerous filename spec and the destination directory path for the malicious payload must exist and the client must be running with sufficient permissions to enable writing of files to the destination directory.

This issue has been addressed and a fix applied to version 13.0.0 and 13.0.1 Only versions prior to v13.0.0 are vulnerable.

Move to ESM

This is a breaking release.

  • The package is now an ES module (ESM only). Use import SftpClient from 'ssh2-sftp-client' in new code. - The minimum supported Node version is now 22.12.0. Node 18 and 20 are no longer supported.
  • Code which still uses CommonJS can keep using const SftpClient = require('ssh2-sftp-client') on Node 22.12.0 and later, which can load ES modules with require(). The package exports the class as module.exports, so existing require() code gets the class itself and not a namespace object. On Node 22.12.x, require() of an ES module prints an ExperimentalWarning to stderr the first time it is used. The warning is harmless. Use import instead (or a newer Node release) to avoid it.
  • The package now has an exports map. Only the package name can be imported (ssh2-sftp-client). Deep imports such as ssh2-sftp-client/src/utils.js and require('ssh2-sftp-client/package.json') are no longer possible.
  • TypeScript declarations are now included with the package.
  • Development tooling changes (not visible to users of the package): the tests, examples and lint config are ESM, coverage uses c8 and mocha is upgraded to v12.
Commits
  • fc33b4b Update README. Bump version and remove v12 change details
  • 5b3df8d Pre-release housekeeping
  • 7537703 chore: bump version to 13.0.1
  • 0a2eded docs: add changelog entry for downloadDir path traversal fix
  • caf6ad8 fix: reject path traversal in downloadDir entry names (CWE-22)
  • ce1e093 Update README
  • e1b87aa test: add error-path and unit tests, fix rcopy assertions
  • 4931f2b chore: require ssh2 ^1.17.0
  • 3db8bf7 chore: resolve deferred review items
  • 48cd6f3 chore: add files allowlist, main/types fields; guard removeRemoteIfExists to ...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [ssh2-sftp-client](https://github.com/theophilusx/ssh2-sftp-client) from 12.1.1 to 13.0.1.
- [Release notes](https://github.com/theophilusx/ssh2-sftp-client/releases)
- [Changelog](https://github.com/theophilusx/ssh2-sftp-client/blob/master/CHANGELOG.org)
- [Commits](theophilusx/ssh2-sftp-client@v12.1.1...v13.0.1)

---
updated-dependencies:
- dependency-name: ssh2-sftp-client
  dependency-version: 13.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Dec 5, 2026
@github-actions github-actions Bot added area: deps Changes files in the deps area size: XS 0–9 lines added and deleted type: build Conventional Commit type build labels Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: deps Changes files in the deps area dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code size: XS 0–9 lines added and deleted type: build Conventional Commit type build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants