Skip to content

Another round of security fixes - #68

Merged
rthellend merged 2 commits into
mainfrom
review-2026-10-16
Oct 16, 2026
Merged

rthellend merged 2 commits into
mainfrom
review-2026-10-16

Conversation

@rthellend

Copy link
Copy Markdown
Contributor

This round is provided by Gemini 4 Argon and reviewed by Claude Fable 5.1

🔒 Security fixes

  • Only trust a host certificate when the Certificate Authority is trusted for the certificate's hostname, not the endpoint alias name, and only offer principals in the host-key prompt for which the CA is trusted.
  • Reject certificates with ValidBefore == 0 as expired, while continuing to accept ssh.CertTimeInfinity (0xffffffffffffffff).
  • Expand SFTP wildcard patterns after CLI flag parsing so remote file names starting with - cannot inject command flags, and strip directory components from uploaded local file names.
  • Require confirmation when CTRL-ALT-W triggers db wipe, and only process keyboard shortcuts at the top-level sshterm> prompt.
  • Clear keys from the in-memory SSH agent on db wipe, db restore, keys delete, keys generate, keys discover, and keys import, even when the agent is locked. db wipe and db restore also reset the agent lock.
  • Reject invalid host keys in config.json's hosts[].key. The error is reported and the remaining preset config is still applied.
  • Bind the WebAuthn public key blob as AES-GCM additional authenticated data (AAD) in encrypted WebAuthn key files (existing v1 keys can still be loaded), verify the registration challenge in WebAuthn.Create, and enforce a minimum of 1,000 PBKDF2 iterations on encrypted WebAuthn keys and database backups.
  • Sanitize certificate critical option names, certificate comments in keys show, and error messages in the host-key prompt, and strip 8-bit CSI (\x9b) characters from pasted text.
  • Show a popup notification in addition to the terminal message when a forwarded agent signs a request.

🔧 Bug fixes

  • Fix agent remove <name> for WebAuthn (ecdsa-sk) keys and deleted keys, and avoid holding the agent lock while fetching user certificates from an identity provider.
  • Fix caTrustedFor and host-certificate trust updates when the hostname includes a :port suffix (such as jump hosts).
  • Fix db restore when restoring empty maps, keys with identity providers, or backups with persist: false, and respect config.json's persist setting.
  • Keep sftp get working across multiple screens when one screen exits.
  • Prevent autoConnect from overwriting keys and settings saved by other open tabs.
  • Fix a race condition when aborting a ZMODEM transfer with Ctrl-C, and reject negative file sizes in ZMODEM ZFILE headers.
  • Fix WebSocket connection cancellation and release js.Func callbacks across websocket, terminal, jsutil, indexeddb, sftp, and app.

rthellend and others added 2 commits October 16, 2026 10:20
- Don't set inShell for non-PTY `ssh host cmd`, so Ctrl-C still cancels
  the context and closes the connection when a remote command hangs.
- Remove deleted or replaced keys from the SSH agent even when the agent
  is locked (keys delete/generate/import/discover), and reset the agent
  lock state on db wipe and db restore.
- Report an invalid preset host key without aborting the rest of the
  preset config.
- Build the v2->v1 downgrade test case from the untampered key bytes so
  it actually exercises the version downgrade path.
- Return the cached stream helper before touching the service worker,
  and drop the unused UnregisterServiceWorker.
- Return the parsed client data from verifyClientData instead of parsing
  ClientDataJSON twice in Sign.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@rthellend
rthellend merged commit 8a1bd0c into main Oct 16, 2026
5 checks passed
@rthellend
rthellend deleted the review-2026-10-16 branch October 16, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant