CVE-2024-45337
golang.org/x/crypto/ssh: Misuse of ServerConfig.PublicKeyCallback may cause authorization bypass in golang.org/x/crypto
Overview
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.
Source: OX vulnerability database
Severity
9.1 · CRITICAL
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| Go | golang.org/x/crypto | <0.31.0 | 0.31.0 |
Open a package to see all its vulnerabilities.
Operating systems · 765 fixes
Azure Linux 1 release · 9 packages
| Release | Package | Fixed in |
|---|---|---|
| 3.0 | docker-buildx | 0:0.14.0-2.azl3 |
| 3.0 | cert-manager | 0:1.12.13-2.azl3 |
| 3.0 | kubevirt | 0:1.2.0-11.azl3 |
| 3.0 | telegraf | 0:1.31.0-3.azl3 |
| 3.0 | packer | 0:1.9.5-4.azl3 |
| 3.0 | docker-compose | 0:2.27.0-2.azl3 |
3 more rows
Red Hat 4 releases · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| heketi +4 | eol | |
| 7 | ose-oauth-proxy | affected |
| 8 | golang-golangorg-crypto-devel +1 | affected |
| 9 | ose-oauth-proxy | affected |
SUSE Linux Enterprise 5 releases · 8 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 15.4 | supportutils-plugin-salt | 1.2.3-150000.3.16.1 | SUSE-SU-2025:0525-1 |
| 15.4 | google-guest-agent | 20250327.01-150000.1.60.1 | SUSE-SU-2025:1143-1 |
| 15.4 | helm +2 | 3.17.1-150000.1.41.1 | SUSE-SU-2025:0602-1 |
| 15.5 | supportutils-plugin-salt | 1.2.3-150000.3.16.1 | SUSE-SU-2025:0525-1 |
| 15.5 | google-guest-agent | 20250327.01-150000.1.60.1 | SUSE-SU-2025:1143-1 |
| 15.5 | helm +2 | 3.17.1-150000.1.41.1 | SUSE-SU-2025:0602-1 |
11 more rows
SUSE Linux Enterprise Micro 3 releases · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.5 | google-guest-agent | 20250327.01-150000.1.60.1 | SUSE-SU-2025:1143-1 |
| 5.5 | helm +1 | 3.17.1-150000.1.41.1 | SUSE-SU-2025:0602-1 |
| 6.0 | google-guest-agent | 20250506.01-1.1 | SUSE-SU-2026:21319-1 |
| 6.0 | helm +1 | 3.17.2-1.1 | SUSE-SU-2025:20196-1 |
| 6.1 | helm +1 | 3.17.2-slfo.1.1_1.1 | SUSE-SU-2025:20278-1 |
alpine 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.22 | rclone | 1.69.0-r0 |
| 3.23 | rclone | 1.69.0-r0 |
| 3.24 | rclone | 1.69.0-r0 |
| edge | rclone | 1.69.0-r0 |
amazon linux 1 release · 4 packages
| Release | Package | Fixed in |
|---|---|---|
| 2023 | amazon-cloudwatch-agent | 1.300052.1-1.amzn2023 |
| 2023 | runfinch-finch | 1.6.0-1.amzn2023.0.1 |
| 2023 | containerd +4 | 1.7.25-1.amzn2023.0.1 |
| 2023 | nerdctl | 2.0.3-1.amzn2023.0.1 |
chainguard 1 release · 384 packages
| Release | Package | Fixed in |
|---|---|---|
| go-fips-1-24 +2 | not affected | |
| dagdotdev | 0.0.11-r1 | |
| wireguard-go | 0.0.20230223-r16 | |
| spegel | 0.0.27-r2 | |
| local-path-provisioner +1 | 0.0.30-r1 | |
| promxy +1 | 0.0.91-r2 |
378 more rows
debian 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | golang-go-crypto | affected |
| 12 | golang-go-crypto | affected |
| 13 | golang-go-crypto | affected |
| 14 | golang-go-crypto | 1:0.42.0-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| golang-go-crypto | affected |
minimos 1 release · 29 packages
| Release | Package | Fixed in |
|---|---|---|
| kserve-modelmesh-runtime-adapter +3 | 0.12.0-r1 | |
| cadvisor | 0.49.1-r1 | |
| kwok | 0.6.1-r1 | |
| unoserver-rest-api | 0.8.3-r2 | |
| kyverno-notation-aws +1 | 1.1-r1 | |
| messaging-topology-operator-1-14 | 1.14.2-r1 |
23 more rows
openSUSE 1 release · 25 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | govulncheck-vulndb | 0.0.20241213T205935-1.1 | openSUSE-SU-2024:14599-1 |
| Tumbleweed | k3sup | 0.13.14-1.1 | openSUSE-SU-2026:12295-1 |
| Tumbleweed | vexctl | 0.4.1+git78.f951e3a-1.1 | openSUSE-SU-2026:10230-1 |
| Tumbleweed | kubeseal | 0.41.1-1.1 | openSUSE-SU-2026:12299-1 |
| Tumbleweed | trivy | 0.58.2-1.1 | openSUSE-SU-2025:14713-1 |
| Tumbleweed | git-bug +3 | 0.8.0+git.1733745604.d499b6e-1.1 | openSUSE-SU-2024:14592-1 |
19 more rows
openSUSE Leap 1 release · 8 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 16.0 | git-bug +3 | 0.10.1-bp160.1.1 | openSUSE-SU-2025:20143-1 |
| 16.0 | gitea-tea +2 | 0.15.1-bp160.1.1 | openSUSE-SU-2026:21603-1 |
| 16.0 | vexctl | 0.4.4+git20.5d61136-160000.1.1 | openSUSE-SU-2026:21481-1 |
| 16.0 | trivy | 0.66.0-bp160.1.1 | openSUSE-SU-2025:20117-1 |
| 16.0 | apptainer +3 | 1.4.5-bp160.1.1 | openSUSE-SU-2026:20730-1 |
| 16.0 | rclone +2 | 1.73.5-bp160.1.1 | openSUSE-SU-2026:20620-1 |
2 more rows
ubuntu 4 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 18.04-ESM | golang-go-crypto | 1:0.0~git20170629.0.5ef0053-2ubuntu0.1~esm1 |
| 18.04-ESM | google-guest-agent | 20241011.01-0ubuntu1~18.04.0+esm1 |
| 20.04-ESM | golang-go-crypto | 1:0.0~git20200221.2aa609c-1ubuntu0.1~esm1 |
| 20.04-ESM | google-guest-agent | 20250116.00-0ubuntu1~20.04.0+esm1 |
| 22.04 | golang-go-crypto | affected |
| 22.04 | google-guest-agent | 20250116.00-0ubuntu1~22.04.1 |
2 more rows
wolfi 1 release · 263 packages
| Release | Package | Fixed in |
|---|---|---|
| dagdotdev | 0.0.11-r1 | |
| wireguard-go | 0.0.20230223-r16 | |
| spegel | 0.0.27-r2 | |
| local-path-provisioner | 0.0.30-r1 | |
| promxy | 0.0.91-r2 | |
| nats | 0.1.5-r2 |
257 more rows
References
- www.openwall.com http://www.openwall.com/lists/oss-security/2024/12/11/2
- access.redhat.com https://access.redhat.com/security/cve/CVE-2024-45337
- github.com https://github.com/golang/crypto/commit/b4f1988a35dee11ec3e05d6bf3e90b695fbd8909
- go-review.googlesource.com https://go-review.googlesource.com/c/crypto/+/635315/
- go.dev https://go.dev/cl/635315
- go.dev https://go.dev/issue/70779
- groups.google.com https://groups.google.com/g/golang-announce/c/-nPEi39gI4Q/m/cGVPJCqdAQAJ
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2024-45337
- pkg.go.dev https://pkg.go.dev/vuln/GO-2024-3321
- security.netapp.com https://security.netapp.com/advisory/ntap-20250131-0007/
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.