Scan your whole stack
Are you using ts-sftp?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.1.3
ts-sftp was last scanned on 13 Aug 2026 at version 0.1.3. Risk score 80 of 100 (high). High-severity rules fired.
| Version | Published | Status |
|---|---|---|
| 0.1.3 LATEST | 13 Aug 2026 | 1 rule fired |
| 0.1.2 | 13 Aug 2026 | No rules fired |
| 0.1.1 | 13 Aug 2026 | No rules fired |
Findings for v0.1.3. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
A file that the package's install scripts may run reads a local file, and the value read appears to reach an outbound network call. Install-time code does not normally need to upload local files.
HIGHThe score describes 0.1.3; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
An SFTP server for Bun, with no dependencies.
The SSH transport, key exchange, public key authentication, and the SFTP
subsystem are implemented in TypeScript on top of node:crypto — nothing else
is installed, nothing native is compiled, and the whole thing runs anywhere Bun
runs.
curve25519-sha256 key exchange, Ed25519 host keys,
aes256-gcm@openssh.com encryption, and OpenSSH's strict KEX extensionrsa-sha2-256/512) user keys, read
straight from authorized_keys linessftp command,
FileZilla, Cyberduck, and WinSCP..
resolved inside that namespace so it cannot climb outSftpFileSystem to serve something other
than local disk (object storage, a database, a virtual tree)bun add ts-sftp
Generate a host key and serve a directory:
bunx ts-sftp keygen --out ./host_key
bunx ts-sftp serve --root ./uploads --host-key ./host_key --user deploy:./deploy.pub
Then connect with any client:
sftp -P 2222 -i ~/.ssh/id_ed25519 deploy@localhost
import { SftpServer } from 'ts-sftp'
const server = new SftpServer({
port: 2222,
hostKeys: [await Bun.file('./host_key').text()],
users: {
deploy: {
publicKeys: ['ssh-ed25519 AAAAC3Nz... deploy@example.com'],
root: './uploads',
},
viewer: {
publicKeys: [await Bun.file('./viewer.pub').text()],
root: './uploads',
readOnly: true,
},
},
})
const { port } = server.listen()
console.log(`listening on ${port}`)
authenticate runs after the signature has been verified, so a true return
means the key is genuine as well as accepted:
const server = new SftpServer({
authenticate: async ({ username, method, publicKey }) => {
if (method !== 'publickey' || !publicKey) return false
return await isEnabled(username, publicKey.comment)
},
})
Any object implementing SftpFileSystem can back a session — the built-in
LocalFileSystem is one implementation, not a requirement:
import type { SftpFileSystem } from 'ts-sftp'
import { SftpServer } from 'ts-sftp'
const server = new SftpServer({
createFileSystem: ({ username }): SftpFileSystem => bucketBackedFileSystem(username),
})
ts-sftp serve [options] Serve a directory over SFTP
ts-sftp keygen [options] Generate an Ed25519 host key
Serve options:
--config <path> Config file (default: sftp.config.ts, if present)
--port <port> Port to listen on (default: 2222)
--host <address> Address to bind (default: 0.0.0.0)
--root <dir> Directory to serve (default: the working directory)
--host-key <path> Host key file. Generated in memory when omitted
--user <name>:<keys path> Grant a user access using an authorized_keys file. Repeatable
--read-only Reject every write
--verbose Log each connection and request
// sftp.config.ts
import { defineConfig } from 'ts-sftp'
export default defineConfig({
port: 2222,
root: './uploads',
users: {
deploy: { publicKeys: ['ssh-ed25519 AAAAC3Nz... deploy@example.com'] },
},
})
exec, no port forwarding — file transfer only, by designThe suite includes end-to-end tests that drive the server with the system's own
OpenSSH sftp client, covering uploads, downloads, directory operations, and
the chroot boundary.
bun test
MIT
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.