CVE-2024-45337
CVE-2024-45337 · Misuse of connection.serverAuthenticate may cause authorization bypass in golang.org/x/crypto
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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/[email protected] 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.
CVSS 9.1 · Critical · EPSS 3.2% · Fix available
- Published
- Updated
Stack: system
Affected products and versions
golang.org/x/crypto/ssh
- Versions
- ≥ 0, < 0.31.0: Affected (semver)
Update to 0.31.0
golang-go.crypto Debian:12
- Versions
- 1:0.10.0-1
- 1:0.12.0-1
- 1:0.13.0-1
- 1:0.14.0-1
- 1:0.16.0-1
- 1:0.17.0-1
- 1:0.18.0-1
- 1:0.19.0-1
- 1:0.21.0-1
- 1:0.22.0-1
- 1:0.23.0-1
- 1:0.24.0-1
- 1:0.24.0-2
- 1:0.25.0-1
- 1:0.25.0-1~bpo12+1
- 1:0.33.0-1~exp1
- 1:0.36.0-1~exp1
- 1:0.4.0-1
- 1:0.41.0-1~exp1
- 1:0.42.0-1
- 1:0.42.0-1~exp1
- 1:0.42.0-2
- 1:0.42.0-3
- 1:0.42.0-4
- 1:0.43.0-1
- 1:0.43.0-2
- 1:0.45.0-1
- 1:0.46.0-1
- 1:0.47.0-1
- 1:0.50.0-1
- 1:0.52.0-1
- 1:0.52.0-1~bpo13+1
- 1:0.53.0-1
- 1:0.54.0-1
- 1:0.55.0-1
- 1:0.56.0-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
golang-go.crypto Debian:13
- Versions
- 1:0.25.0-1
- 1:0.33.0-1~exp1
- 1:0.36.0-1~exp1
- 1:0.41.0-1~exp1
- 1:0.42.0-1
- 1:0.42.0-1~exp1
- 1:0.42.0-2
- 1:0.42.0-3
- 1:0.42.0-4
- 1:0.43.0-1
- 1:0.43.0-2
- 1:0.45.0-1
- 1:0.46.0-1
- 1:0.47.0-1
- 1:0.50.0-1
- 1:0.52.0-1
- 1:0.52.0-1~bpo13+1
- 1:0.53.0-1
- 1:0.54.0-1
- 1:0.55.0-1
- 1:0.56.0-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
golang-go.crypto Debian:14
- Versions
- 1:0.25.0-1
- 1:0.33.0-1~exp1
- 1:0.36.0-1~exp1
- 1:0.41.0-1~exp1
- 1:0.42.0-1~exp1
- Affected ranges
- ECOSYSTEM: < 1:0.42.0-1
Update to 1:0.42.0-1
golang-go.crypto Ubuntu:Pro:16.04:LTS
- Versions
- 1:0.0~git20150608-1
- 1:0.0~git20151201.0.7b85b09-2
- Affected ranges
- ECOSYSTEM: < 1:0.0~git20151201.0.7b85b09-2ubuntu0.1~esm1
Update to 1:0.0~git20151201.0.7b85b09-2ubuntu0.1~esm1
google-guest-agent Ubuntu:Pro:16.04:LTS
- Versions
- 20201217.02-0ubuntu1~16.04.0
- 20230426.00-0ubuntu2~16.04.3
- 20231004.02-0ubuntu1~16.04.1
- 20231004.02-0ubuntu1~16.04.2
- 20240716.00-0ubuntu1~16.04.0
- Affected ranges
- ECOSYSTEM: < 20240716.00-0ubuntu1~16.04.0+esm1
Update to 20240716.00-0ubuntu1~16.04.0+esm1
lxd Ubuntu:Pro:16.04:LTS
- Versions
- 0.20-0ubuntu4
- 0.21-0ubuntu3
- 0.21-0ubuntu5
- 0.22-0ubuntu1
- 0.22-0ubuntu2
- 0.23-0ubuntu1
- 0.23-0ubuntu2
- 0.23-0ubuntu3
- 0.24-0ubuntu2
- 0.24-0ubuntu3
- 0.24-0ubuntu4
- 0.25-0ubuntu1
- 0.26-0ubuntu2
- 0.26-0ubuntu3
- 0.27-0ubuntu1
- 0.27-0ubuntu2
- 2.0.0~beta1-0ubuntu3
- 2.0.0~beta1-0ubuntu4
- 2.0.0~beta2-0ubuntu1
- 2.0.0~beta2-0ubuntu2
- 2.0.0~beta3-0ubuntu1
- 2.0.0~beta3-0ubuntu2
- 2.0.0~beta3-0ubuntu3
- 2.0.0~beta3-0ubuntu4
- 2.0.0~beta4-0ubuntu1
- 2.0.0~beta4-0ubuntu2
- 2.0.0~beta4-0ubuntu3
- 2.0.0~beta4-0ubuntu4
- 2.0.0~beta4-0ubuntu5
- 2.0.0~beta4-0ubuntu6
- 2.0.0~beta4-0ubuntu7
- 2.0.0~rc1-0ubuntu1
- 2.0.0~rc1-0ubuntu2
- 2.0.0~rc1-0ubuntu3
- 2.0.0~rc2-0ubuntu2
- 2.0.0~rc2-0ubuntu3
- 2.0.0~rc3-0ubuntu1
- 2.0.0~rc3-0ubuntu2
- 2.0.0~rc3-0ubuntu3
- 2.0.0~rc3-0ubuntu4
- 2.0.0~rc4-0ubuntu1
- 2.0.0~rc5-0ubuntu1
- 2.0.0~rc6-0ubuntu1
- 2.0.0~rc6-0ubuntu2
- 2.0.0~rc7-0ubuntu1
- 2.0.0~rc7-0ubuntu2
- 2.0.0~rc8-0ubuntu1
- 2.0.0~rc8-0ubuntu2
- 2.0.0~rc8-0ubuntu3
- 2.0.0~rc8-0ubuntu5
- 2.0.0~rc8-0ubuntu6
- 2.0.0~rc8-0ubuntu7
- 2.0.0~rc9-0ubuntu2
- 2.0.0~rc9-0ubuntu3
- 2.0.0~rc9-0ubuntu4
- 2.0.0~rc9-0ubuntu5
- 2.0.0-0ubuntu1
- 2.0.0-0ubuntu2
- 2.0.0-0ubuntu3
- 2.0.0-0ubuntu4
- 2.0.1-0ubuntu1~16.04.1
- 2.0.2-0ubuntu1~16.04.1
- 2.0.3-0ubuntu1~ubuntu16.04.2
- 2.0.4-0ubuntu1~ubuntu16.04.1
- 2.0.5-0ubuntu1~ubuntu16.04.1
- 2.0.8-0ubuntu1~ubuntu16.04.1
- 2.0.8-0ubuntu1~ubuntu16.04.2
- 2.0.9-0ubuntu1~16.04.1
- 2.0.9-0ubuntu1~16.04.2
- 2.0.10-0ubuntu1~16.04.1
- 2.0.10-0ubuntu1~16.04.2
- 2.0.11-0ubuntu1~16.04.2
- 2.0.11-0ubuntu1~16.04.4
- 2.0.11-0ubuntu1~16.04.4+esm1
- 2.0.11-0ubuntu1~16.04.4+esm2
- 2.0.11-0ubuntu1~16.04.4+esm3
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
lxd Ubuntu:Pro:18.04:LTS
- Versions
- 2.18-0ubuntu6
- 2.19-0ubuntu1
- 2.20-0ubuntu3
- 2.20-0ubuntu4
- 2.21-0ubuntu1
- 2.21-0ubuntu2
- 2.21-0ubuntu3
- 2.21-0ubuntu4
- 3.0.0~beta2-0ubuntu3
- 3.0.0~beta3-0ubuntu3
- 3.0.0~beta5-0ubuntu2
- 3.0.0~beta7-0ubuntu1
- 3.0.0-0ubuntu1
- 3.0.0-0ubuntu2
- 3.0.0-0ubuntu3
- 3.0.0-0ubuntu4
- 3.0.1-0ubuntu1~18.04.1
- 3.0.2-0ubuntu1~18.04.1
- 3.0.3-0ubuntu1~18.04.1
- 3.0.3-0ubuntu1~18.04.2
- 3.0.3-0ubuntu1~18.04.2+esm1
- 3.0.3-0ubuntu1~18.04.2+esm2
- 3.0.3-0ubuntu1~18.04.2+esm3
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
golang-go.crypto Ubuntu:Pro:18.04:LTS
- Versions
- 1:0.0~git20170629.0.5ef0053-1ubuntu1
- 1:0.0~git20170629.0.5ef0053-1ubuntu2
- 1:0.0~git20170629.0.5ef0053-2
- Affected ranges
- ECOSYSTEM: < 1:0.0~git20170629.0.5ef0053-2ubuntu0.1~esm1
Update to 1:0.0~git20170629.0.5ef0053-2ubuntu0.1~esm1
google-guest-agent Ubuntu:Pro:18.04:LTS
- Versions
- 20201217.02-0ubuntu1~18.04.0
- 20210414.00-0ubuntu1~18.04.0
- 20210629.00-0ubuntu1~18.04.1
- 20220622.00-0ubuntu2~18.04.0
- 20220622.00-0ubuntu2~18.04.1
- 20230426.00-0ubuntu2~18.04.0
- 20231004.02-0ubuntu1~18.04.2
- 20231004.02-0ubuntu1~18.04.3
- 20240716.00-0ubuntu1~18.04.0
- 20241011.01-0ubuntu1~18.04.0
- Affected ranges
- ECOSYSTEM: < 20241011.01-0ubuntu1~18.04.0+esm1
Update to 20241011.01-0ubuntu1~18.04.0+esm1
google-guest-agent Ubuntu:Pro:20.04:LTS
- Versions
- 20201217.02-0ubuntu1~20.04.0
- 20210414.00-0ubuntu1~20.04.0
- 20210629.00-0ubuntu1~20.04.0
- 20220622.00-0ubuntu2~20.04.0
- 20220622.00-0ubuntu2~20.04.2
- 20230426.00-0ubuntu2~20.04.0
- 20231004.02-0ubuntu1~20.04.1
- 20231004.02-0ubuntu1~20.04.2
- 20231004.02-0ubuntu1~20.04.3
- 20231004.02-0ubuntu1~20.04.4
- 20240716.00-0ubuntu1~20.04.0
- 20241011.01-0ubuntu1~20.04.1
- 20250116.00-0ubuntu1~20.04.0
- Affected ranges
- ECOSYSTEM: < 20250116.00-0ubuntu1~20.04.0+esm1
Update to 20250116.00-0ubuntu1~20.04.0+esm1
golang-go.crypto Ubuntu:Pro:20.04:LTS
- Versions
- 1:0.0~git20190701.4def268-2
- 1:0.0~git20200221.2aa609c-1
- Affected ranges
- ECOSYSTEM: < 1:0.0~git20200221.2aa609c-1ubuntu0.1~esm1
Update to 1:0.0~git20200221.2aa609c-1ubuntu0.1~esm1
google-guest-agent Ubuntu:22.04:LTS
- Versions
- 20210629.00-0ubuntu1
- 20210629.00-0ubuntu2
- 20220104.00-0ubuntu1
- 20220104.00-0ubuntu2
- 20220622.00-0ubuntu2~22.04.0
- 20220622.00-0ubuntu2~22.04.1
- 20230426.00-0ubuntu2~22.04.0
- 20231004.02-0ubuntu1~22.04.1
- 20231004.02-0ubuntu1~22.04.2
- 20231004.02-0ubuntu1~22.04.3
- 20231004.02-0ubuntu1~22.04.4
- 20231004.02-0ubuntu1~22.04.5
- 20240716.00-0ubuntu1~22.04.0
- 20241011.01-0ubuntu1~22.04.0
- 20250116.00-0ubuntu1~22.04.0
- Affected ranges
- ECOSYSTEM: < 20250116.00-0ubuntu1~22.04.1
Update to 20250116.00-0ubuntu1~22.04.1
golang-go.crypto Ubuntu:Pro:22.04:LTS
- Versions
- 1:0.0~git20201221.eec23a3-1
- 1:0.0~git20211202.5770296-1
- Affected ranges
- ECOSYSTEM: < 1:0.0~git20211202.5770296-1ubuntu0.1~esm1
Update to 1:0.0~git20211202.5770296-1ubuntu0.1~esm1
google-guest-agent Ubuntu:24.04:LTS
- Versions
- 20230426.00-0ubuntu3
- 20231004.02-0ubuntu1
- 20231004.02-0ubuntu3
- 20240213.00-0ubuntu1
- 20240213.00-0ubuntu2
- 20240213.00-0ubuntu3
- 20240213.00-0ubuntu3.1
- 20240213.00-0ubuntu3.2
- 20240716.00-0ubuntu1~24.04.0
- 20240716.00-0ubuntu1~24.04.1
- 20241011.01-0ubuntu1~24.04.0
- 20250116.00-0ubuntu1~24.04.0
- 20250116.00-0ubuntu1~24.04.1
- Affected ranges
- ECOSYSTEM: < 20250116.00-0ubuntu1~24.04.2
Update to 20250116.00-0ubuntu1~24.04.2
golang-go.crypto Ubuntu:Pro:24.04:LTS
- Versions
- 1:0.4.0-1
- 1:0.17.0-1
- 1:0.18.0-1
- 1:0.19.0-1
- Affected ranges
- ECOSYSTEM: < 1:0.19.0-1ubuntu0.1~esm1
Update to 1:0.19.0-1ubuntu0.1~esm1
golang-go.crypto Ubuntu:25.10
- Versions
- 1:0.25.0-1
- 1:0.25.0-1ubuntu0.1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
Original sources
- 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
- http://www.openwall.com/lists/oss-security/2024/12/11/2
- https://security.netapp.com/advisory/ntap-20250131-0007/
- https://nvd.nist.gov/vuln/detail/CVE-2024-45337