CVE-2024-45337Misuse of connection.serverAuthenticate may cause authorization bypass in…
Applications and libraries which misuse connection.serverAuthenticate (via callback field ServerConfig.PublicKeyCallback) may be susceptible to an authorization bypass. The documentation for ServerConfig.PublicKeyCallback says that "A call to this function does not guarantee that the key offered is in fact used to authenticate." Specifically, the SSH protocol allows clients to inquire about whether a public key is acceptable before proving control of the corresponding private key. PublicKeyCallback may be called with multiple keys, and the order in which the keys were provided cannot be used to infer which key the client successfully authenticated with, if any. Some applications, which store the key(s) passed to PublicKeyCallback (or derived information) and make security relevant determinations based on it once the connection is established, may make incorrect assumptions. For example, an attacker may send public keys A and B, and then authenticate with A. PublicKeyCallback would be called only twice, first with A and then with B. A vulnerable application may then make authorization decisions based on key B for which the attacker does not actually control the private key. Since this API is widely misused, as a partial mitigation golang.org/x/cry...@v0.31.0 enforces the property that, when successfully authenticating via public key, the last key passed to ServerConfig.PublicKeyCallback will be the key used to authenticate the connection. PublicKeyCallback will now be called multiple times with the same key, if necessary. Note that the client may still not control the last key passed to PublicKeyCallback if the connection is then authenticated with a different method, such as PasswordCallback, KeyboardInteractiveCallback, or NoClientAuth. Users should be using the Extensions field of the Permissions return value from the various authentication callbacks to record data associated with the authentication attempt instead of referencing external state. Once the connection is established the state corresponding to the successful authentication attempt can be retrieved via the ServerConn.Permissions field. Note that some third-party libraries misuse the Permissions type by sharing it across authentication attempts; users of third-party libraries should refer to the relevant projects for guidance.
What to do
Fixed builds are available from Alpine, Debian, Go, Ubuntu: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | google-guest-agent | Not affected vulnerable_code_not_present | ||
| Ubuntu 26.04 | snapd | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | golang-go.crypto | Will not fix snapd contains an embedded copy of golang-go.crypto lxd in 18.04 LTS and earlier contains an embedded copy of golang-go.crypto google-guest-agent contains an… | UBUNTU-CVE-2024-45337 | |
| Ubuntu 25.10 | google-guest-agent | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | snapd | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | golang-go.crypto | Fix pending | 1:0.19.0-1ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-45337 |
| Ubuntu 24.04 | google-guest-agent | Fixed | 20250116.00-0ubuntu1~24.04.2 | UBUNTU-CVE-2024-45337 |
| Ubuntu 24.04 | snapd | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | golang-go.crypto | Fix pending | 1:0.0~git20211202.5770296-1ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-45337 |
| Ubuntu 22.04 | google-guest-agent | Fixed | 20250116.00-0ubuntu1~22.04.1 | UBUNTU-CVE-2024-45337 |
| Ubuntu 22.04 | snapd | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | golang-go.crypto | Fix pending | 1:0.0~git20200221.2aa609c-1ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-45337 |
| Ubuntu 20.04 | google-guest-agent | Fix pending | 20250116.00-0ubuntu1~20.04.0+esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-45337 |
| Ubuntu 20.04 | lxd | Not affected vulnerable_code_not_present | ||
| Ubuntu 18.04 | golang-go.crypto | Fix pending | 1:0.0~git20170629.0.5ef0053-2ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-45337 |
| Ubuntu 18.04 | google-guest-agent | Fix pending | 20241011.01-0ubuntu1~18.04.0+esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-45337 |
| Ubuntu 18.04 | lxd | Fix pending | UBUNTU-CVE-2024-45337 | |
| Ubuntu 16.04 | golang-go.crypto | Fix pending | 1:0.0~git20151201.0.7b85b09-2ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-45337 |
| Ubuntu 16.04 | google-guest-agent | Fix pending | 20240716.00-0ubuntu1~16.04.0+esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-45337 |
| Ubuntu 16.04 | lxd | Fix pending | UBUNTU-CVE-2024-45337 | |
| Debian 14 | golang-go.crypto | Fixed | 1:0.42.0-1 | DEBIAN-CVE-2024-45337 |
| Debian 13 | golang-go.crypto | Fix pending | DEBIAN-CVE-2024-45337 | |
| Debian 12 | golang-go.crypto | Fix pending | DEBIAN-CVE-2024-45337 | |
| Red Hat Enterprise Linux 10 | aardvark-dns | Not affected | ||
| Red Hat Enterprise Linux 10 | buildah | Not affected | ||
| Red Hat Enterprise Linux 10 | buildah-tests | Not affected | ||
| Red Hat Enterprise Linux 10 | containers-common | Not affected | ||
| Red Hat Enterprise Linux 10 | containers-common-extra | Not affected | ||
| Red Hat Enterprise Linux 10 | gvisor-tap-vsock | Not affected | ||
| Red Hat Enterprise Linux 10 | gvisor-tap-vsock-gvforwarder | Not affected | ||
| Red Hat Enterprise Linux 10 | netavark | Not affected | ||
| Red Hat Enterprise Linux 10 | podman | Not affected | ||
| Red Hat Enterprise Linux 10 | podman-docker | Not affected | ||
| Red Hat Enterprise Linux 10 | podman-remote | Not affected | ||
| Red Hat Enterprise Linux 10 | podman-tests | Not affected | ||
| Red Hat Enterprise Linux 9 | buildah | Not affected | ||
| Red Hat Enterprise Linux 9 | buildah-tests | Not affected | ||
| Red Hat Enterprise Linux 9 | gvisor-tap-vsock | Not affected | ||
| Red Hat Enterprise Linux 9 | gvisor-tap-vsock-gvforwarder | Not affected | ||
| Red Hat Enterprise Linux 9 | podman | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-catatonit | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-docker | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-gvproxy | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-plugins | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-remote | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-tests | Not affected | ||
| Red Hat Enterprise Linux 8 | buildah | Not affected | ||
| Red Hat Enterprise Linux 8 | buildah-tests | Not affected | ||
| Red Hat Enterprise Linux 8 | podman | Not affected | ||
| Red Hat Enterprise Linux 8 | podman-catatonit | Not affected | ||
| Red Hat Enterprise Linux 8 | podman-docker | Not affected | ||
| Red Hat Enterprise Linux 8 | podman-gvproxy | Not affected | ||
| Red Hat Enterprise Linux 8 | podman-manpages | Not affected | ||
| Red Hat Enterprise Linux 8 | podman-plugins | Not affected | ||
| Red Hat Enterprise Linux 8 | podman-remote | Not affected | ||
| Red Hat Enterprise Linux 8 | podman-tests | Not affected | ||
| Alpine Linux 3.24 | rclone | Fixed | 1.69.0-r0 | ALPINE-CVE-2024-45337 |
| Alpine Linux 3.23 | rclone | Fixed | 1.69.0-r0 | ALPINE-CVE-2024-45337 |
| Alpine Linux 3.22 | rclone | Fixed | 1.69.0-r0 | ALPINE-CVE-2024-45337 |
| Go library | golang.org/x/crypto | Fixed | 0.31.0 | GO-2024-3321 |
What the vendor says
As published in the CVE record by Go, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- golang.org/x/crypto/ssh: affected: before 0.31.0; fixed in
0.31.0
References
- https://github.com/golang/crypto/commit/b4f1988a35dee11ec3e05d6bf3e90b695fbd8909
- https://go.dev/cl/635315
- https://go.dev/issue/70779
- https://groups.google.com/g/golang-announce/c/-nPEi39gI4Q/m/cGVPJCqdAQAJ
- https://pkg.go.dev/vuln/GO-2024-3321
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.