Skip to content

2026.0.0.0

Latest

Choose a tag to compare

@darinkes darinkes released this 14 Aug 07:17

SSH.NET extension to generate and export authentication keys in OpenSSH and PuTTY format.

A security release on top of 2024.2.0.5. This release requires SSH.NET 2026.0.0 or newer.

Security

  • SSH.NET raised to [2026.0.0,2027.0) (GHSA-q939-rpr3-3284, CVE-2026-48798, high). SSH.NET <= 2025.1.0 lets a malicious, compromised or MITM SCP server write files outside the target directory during a recursive ScpClient.Download.

    SshNet.Keygen never calls ScpClient, so the extension itself was not exploitable. But NuGet resolves the floor of a version range, so consumers who did not pin SSH.NET themselves pulled the vulnerable 2024.2.0 transitively and got an NU1903 warning for it. Raising the floor is the only lever the package has.

Fixes

  • Exporting a key with no comment no longer throws (#62). Formats without a comment field (PKCS#1, SEC1) leave Key.Comment null, which the OpenSSH and PuTTY private-key writers passed straight to Encoding.UTF8.GetBytes.

Breaking

  • SSH.NET 2024.x and 2025.x are no longer supported. Consumers pinned to those versions cannot take this release; the package version tracks the SSH.NET line it now requires.
  • SSH.NET 2026.0.0 removed Renci.SshNet.Security.Cryptography.Ciphers.Paddings; the unused using went with it.

Known issue

Reading a generated ECDSA PuTTY key back through SSH.NET fails on .NET Framework for roughly half of all keys. SSH.NET's PuTTY reader hands the mpint private scalar to CNG unpadded, so keys whose scalar has the high bit set — and therefore carry PuTTY's leading zero byte — produce a BCRYPT_ECCPRIVATE_BLOB of the wrong length and fail to import with CryptographicException: The requested operation is not supported. The keys this package writes match what puttygen itself produces, and they load fine on .NET 8+; the round-trip test is skipped on net48 until SSH.NET pads the scalar.

NuGet: https://www.nuget.org/packages/SshNet.Keygen/2026.0.0 (NuGet normalises the 2026.0.0.0 tag to 2026.0.0)

Full changelog: 2024.2.0.5...2026.0.0.0