CVE-2024-45337 Misuse of connection.serverAuthenticate may cause authorization bypass in golang.org/x/crypto
- Published
- Updated
- Exploit status
- No public exploit known
Description
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.
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| golang.org/x/crypto(Go) | < 0.31.0 | 0.31.0 |
| cbl-mariner moby-engine(CBL-Mariner:2.0) | < 24.0.9-12 | 24.0.9-12 |
| cbl-mariner cert-manager(CBL-Mariner:2.0) | < 1.11.2-16 | 1.11.2-16 |
| cbl-mariner moby-compose(CBL-Mariner:2.0) | < 2.17.3-9 | 2.17.3-9 |
| cbl-mariner telegraf(CBL-Mariner:2.0) | < 1.29.4-10 | 1.29.4-10 |
| azure linux gh(Azure Linux:3.0) | < 2.62.0-3 | 2.62.0-3 |
| azure linux docker-compose(Azure Linux:3.0) | < 2.27.0-2 | 2.27.0-2 |
| azure linux cert-manager(Azure Linux:3.0) | < 1.12.13-2 | 1.12.13-2 |
| azure linux telegraf(Azure Linux:3.0) | < 1.31.0-3 | 1.31.0-3 |
| azure linux moby-engine(Azure Linux:3.0) | < 25.0.3-9 | 25.0.3-9 |
| azure linux docker-buildx(Azure Linux:3.0) | < 0.14.0-2 | 0.14.0-2 |
| azure linux kubevirt(Azure Linux:3.0) | < 1.2.0-11 | 1.2.0-11 |
| azure linux packer(Azure Linux:3.0) | < 1.9.5-4 | 1.9.5-4 |
| azure linux cf-cli(Azure Linux:3.0) | < 8.7.3-4 | 8.7.3-4 |
| cbl-mariner packer(CBL-Mariner:2.0) | < 1.9.5-5 | 1.9.5-5 |
| debian/golang-go.crypto(Debian:12) | All versions | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.10.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.12.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.13.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.14.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.16.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.17.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.18.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.19.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.21.0-1 | No fix listed |
Show 71 more
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/golang-go.crypto(Debian:12) | = 1:0.22.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.23.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.24.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.24.0-2 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.25.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.25.0-1~bpo12+1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.33.0-1~exp1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.36.0-1~exp1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.4.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.41.0-1~exp1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.42.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.42.0-1~exp1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.42.0-2 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.42.0-3 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.42.0-4 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.43.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.43.0-2 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.45.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.46.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.47.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.50.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.52.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.52.0-1~bpo13+1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.53.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.54.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.55.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.56.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.57.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.57.0-2 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.57.0-2~bpo13+1 | No fix listed |
| debian/golang-go.crypto(Debian:12) | = 1:0.58.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | All versions | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.25.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.33.0-1~exp1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.36.0-1~exp1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.41.0-1~exp1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.42.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.42.0-1~exp1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.42.0-2 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.42.0-3 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.42.0-4 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.43.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.43.0-2 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.45.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.46.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.47.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.50.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.52.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.52.0-1~bpo13+1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.53.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.54.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.55.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.56.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.57.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.57.0-2 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.57.0-2~bpo13+1 | No fix listed |
| debian/golang-go.crypto(Debian:13) | = 1:0.58.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:14) | < 1:0.42.0-1 | 1:0.42.0-1 |
| debian/golang-go.crypto(Debian:14) | = 1:0.25.0-1 | No fix listed |
| debian/golang-go.crypto(Debian:14) | = 1:0.33.0-1~exp1 | No fix listed |
| debian/golang-go.crypto(Debian:14) | = 1:0.36.0-1~exp1 | No fix listed |
| debian/golang-go.crypto(Debian:14) | = 1:0.41.0-1~exp1 | No fix listed |
| debian/golang-go.crypto(Debian:14) | = 1:0.42.0-1~exp1 | No fix listed |
| ubuntu/google-guest-agent(Ubuntu:22.04) | < 20250116.00-0ubuntu1~22.04.1 | 20250116.00-0ubuntu1~22.04.1 |
| ubuntu/golang-go.crypto(Ubuntu:22.04) | < 1:0.0~git20211202.5770296-1ubuntu0.1~esm1 | 1:0.0~git20211202.5770296-1ubuntu0.1~esm1 |
| golang.org/x/crypto/ssh(Go) | < 0.31.0 | 0.31.0 |
| alpine/rclone(Alpine:v3.22) | < 1.69.0-r0 | 1.69.0-r0 |
| alpine/rclone(Alpine:v3.23) | < 1.69.0-r0 | 1.69.0-r0 |
| alpine/rclone(Alpine:v3.24) | < 1.69.0-r0 | 1.69.0-r0 |
| ubuntu/google-guest-agent(Ubuntu:24.04) | < 20250116.00-0ubuntu1~24.04.2 | 20250116.00-0ubuntu1~24.04.2 |
| ubuntu/golang-go.crypto(Ubuntu:24.04) | < 1:0.19.0-1ubuntu0.1~esm1 | 1:0.19.0-1ubuntu0.1~esm1 |
References
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com patch
- github.com product
- go.dev patch
- go.dev issue-tracking
- groups.google.com
- pkg.go.dev
- security.netapp.com
- www.openwall.com
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- github.com
- Debian Security Tracker CVE-2024-45337 vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- USN-7839-1 vendor-advisory
- USN-7839-2 vendor-advisory
- www.cve.org
- security.alpinelinux.org vendor-advisory
- bugs.debian.org issue-tracking