CVEfocus › CVE database › CVE-2024-45337

CVE-2024-45337Misuse of connection.serverAuthenticate may cause authorization bypass in…

CVSS 9.1 CriticalEPSS 3.8% (higher than 90% of CVEs)Published 2024-12-11Updated 2025-02-18Assigner: Go

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

7Fixed
12Fix pending
1Will not fix
40Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04google-guest-agentNot affected
vulnerable_code_not_present
Ubuntu 26.04snapdNot affected
vulnerable_code_not_present
Ubuntu 25.10golang-go.cryptoWill 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.10google-guest-agentNot affected
vulnerable_code_not_present
Ubuntu 25.10snapdNot affected
vulnerable_code_not_present
Ubuntu 24.04golang-go.cryptoFix pending1:0.19.0-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2024-45337
Ubuntu 24.04google-guest-agentFixed20250116.00-0ubuntu1~24.04.2UBUNTU-CVE-2024-45337
Ubuntu 24.04snapdNot affected
vulnerable_code_not_present
Ubuntu 22.04golang-go.cryptoFix pending1:0.0~git20211202.5770296-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2024-45337
Ubuntu 22.04google-guest-agentFixed20250116.00-0ubuntu1~22.04.1UBUNTU-CVE-2024-45337
Ubuntu 22.04snapdNot affected
vulnerable_code_not_present
Ubuntu 20.04golang-go.cryptoFix pending1:0.0~git20200221.2aa609c-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2024-45337
Ubuntu 20.04google-guest-agentFix pending20250116.00-0ubuntu1~20.04.0+esm1 (Ubuntu Pro)UBUNTU-CVE-2024-45337
Ubuntu 20.04lxdNot affected
vulnerable_code_not_present
Ubuntu 18.04golang-go.cryptoFix pending1:0.0~git20170629.0.5ef0053-2ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2024-45337
Ubuntu 18.04google-guest-agentFix pending20241011.01-0ubuntu1~18.04.0+esm1 (Ubuntu Pro)UBUNTU-CVE-2024-45337
Ubuntu 18.04lxdFix pendingUBUNTU-CVE-2024-45337
Ubuntu 16.04golang-go.cryptoFix pending1:0.0~git20151201.0.7b85b09-2ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2024-45337
Ubuntu 16.04google-guest-agentFix pending20240716.00-0ubuntu1~16.04.0+esm1 (Ubuntu Pro)UBUNTU-CVE-2024-45337
Ubuntu 16.04lxdFix pendingUBUNTU-CVE-2024-45337
Debian 14golang-go.cryptoFixed1:0.42.0-1DEBIAN-CVE-2024-45337
Debian 13golang-go.cryptoFix pendingDEBIAN-CVE-2024-45337
Debian 12golang-go.cryptoFix pendingDEBIAN-CVE-2024-45337
Red Hat Enterprise Linux 10aardvark-dnsNot affected
Red Hat Enterprise Linux 10buildahNot affected
Red Hat Enterprise Linux 10buildah-testsNot affected
Red Hat Enterprise Linux 10containers-commonNot affected
Red Hat Enterprise Linux 10containers-common-extraNot affected
Red Hat Enterprise Linux 10gvisor-tap-vsockNot affected
Red Hat Enterprise Linux 10gvisor-tap-vsock-gvforwarderNot affected
Red Hat Enterprise Linux 10netavarkNot affected
Red Hat Enterprise Linux 10podmanNot affected
Red Hat Enterprise Linux 10podman-dockerNot affected
Red Hat Enterprise Linux 10podman-remoteNot affected
Red Hat Enterprise Linux 10podman-testsNot affected
Red Hat Enterprise Linux 9buildahNot affected
Red Hat Enterprise Linux 9buildah-testsNot affected
Red Hat Enterprise Linux 9gvisor-tap-vsockNot affected
Red Hat Enterprise Linux 9gvisor-tap-vsock-gvforwarderNot affected
Red Hat Enterprise Linux 9podmanNot affected
Red Hat Enterprise Linux 9podman-catatonitNot affected
Red Hat Enterprise Linux 9podman-dockerNot affected
Red Hat Enterprise Linux 9podman-gvproxyNot affected
Red Hat Enterprise Linux 9podman-pluginsNot affected
Red Hat Enterprise Linux 9podman-remoteNot affected
Red Hat Enterprise Linux 9podman-testsNot affected
Red Hat Enterprise Linux 8buildahNot affected
Red Hat Enterprise Linux 8buildah-testsNot affected
Red Hat Enterprise Linux 8podmanNot affected
Red Hat Enterprise Linux 8podman-catatonitNot affected
Red Hat Enterprise Linux 8podman-dockerNot affected
Red Hat Enterprise Linux 8podman-gvproxyNot affected
Red Hat Enterprise Linux 8podman-manpagesNot affected
Red Hat Enterprise Linux 8podman-pluginsNot affected
Red Hat Enterprise Linux 8podman-remoteNot affected
Red Hat Enterprise Linux 8podman-testsNot affected
Alpine Linux 3.24rcloneFixed1.69.0-r0ALPINE-CVE-2024-45337
Alpine Linux 3.23rcloneFixed1.69.0-r0ALPINE-CVE-2024-45337
Alpine Linux 3.22rcloneFixed1.69.0-r0ALPINE-CVE-2024-45337
Go librarygolang.org/x/cryptoFixed0.31.0GO-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.

References

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.