cve.bz

CVE-2024-45337 golang.org/x/crypto golang.org/x/crypto/ssh

9.1 criticalEPSS 3.8%Fix available

Critical (9.1) in golang.org/x/crypto golang.org/x/crypto/ssh. EPSS 3.8% estimated probability of exploitation activity in the next 30 days. Fixed in golang.org/x/crypto 0.31.0.

On this page
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.

Severity

CVSS 3.1

9.1 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
EPSS
3.8% (unchanged from 3.8% a week ago; 3.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 90th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: total, assessed 2024-12-12. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-45337 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-45337?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-45337?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-45337 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
golang.org/x/crypto/sshbefore 0.31.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-v778-237x-gjrcGogolang.org/x/crypto<0.31.00.31.0
GO-2024-3321Gogolang.org/x/crypto<0.31.00.31.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13golang-go.cryptono fix listedDEBIAN-CVE-2024-45337
Debian14golang-go.crypto1:0.42.0-1DEBIAN-CVE-2024-45337
Ubuntu22.04:LTSgoogle-guest-agent20250116.00-0ubuntu1~22.04.1UBUNTU-CVE-2024-45337 USN-7839-2
Ubuntu24.04:LTSgoogle-guest-agent20250116.00-0ubuntu1~24.04.2UBUNTU-CVE-2024-45337 USN-7839-2
Ubuntu25.10golang-go.cryptono fix listedUBUNTU-CVE-2024-45337
UbuntuPro:16.04:LTSgolang-go.crypto1:0.0~git20151201.0.7b85b09-2ubuntu0.1~esm1UBUNTU-CVE-2024-45337 USN-7839-1
UbuntuPro:16.04:LTSgoogle-guest-agent20240716.00-0ubuntu1~16.04.0+esm1UBUNTU-CVE-2024-45337 USN-7839-2
UbuntuPro:16.04:LTS, Pro:18.04:LTSlxdno fix listedUBUNTU-CVE-2024-45337
UbuntuPro:18.04:LTSgolang-go.crypto1:0.0~git20170629.0.5ef0053-2ubuntu0.1~esm1UBUNTU-CVE-2024-45337 USN-7839-1
UbuntuPro:18.04:LTSgoogle-guest-agent20241011.01-0ubuntu1~18.04.0+esm1UBUNTU-CVE-2024-45337 USN-7839-2
UbuntuPro:20.04:LTSgolang-go.crypto1:0.0~git20200221.2aa609c-1ubuntu0.1~esm1UBUNTU-CVE-2024-45337 USN-7839-1
UbuntuPro:20.04:LTSgoogle-guest-agent20250116.00-0ubuntu1~20.04.0+esm1UBUNTU-CVE-2024-45337 USN-7839-2
UbuntuPro:22.04:LTSgolang-go.crypto1:0.0~git20211202.5770296-1ubuntu0.1~esm1UBUNTU-CVE-2024-45337 USN-7839-1
UbuntuPro:24.04:LTSgolang-go.crypto1:0.19.0-1ubuntu0.1~esm1UBUNTU-CVE-2024-45337 USN-7839-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 12 morehelm3.17.1-150000.1.41.1SUSE-SU-2025:0602-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 13 moresupportutils-plugin-salt1.2.3-150000.3.16.1SUSE-SU-2025:0525-1
SUSELinux Enterprise Micro 5.5, Linux Enterprise Module for Public Cloud 15 SP3, Linux Enterprise Module for Public Cloud 15 SP4 and 2 moregoogle-guest-agent20250327.01-150000.1.60.1SUSE-SU-2025:1143-1
SUSELinux Enterprise Micro 5.5, Linux Enterprise Module for Public Cloud 15 SP4, Linux Enterprise Module for Public Cloud 15 SP5 and 2 moregoogle-guest-agent20260529.00-150000.1.70.1SUSE-SU-2026:2612-1
SUSELinux Enterprise Module for Containers 15 SP6kubevirt1.4.1-150600.5.24.1SUSE-SU-2025:03278-1
SUSELinux Enterprise Module for Containers 15 SP7kubevirt1.5.2-150700.3.5.2SUSE-SU-2025:02581-1
SUSELinux Enterprise Module for Desktop Applications 15 SP6brise20230603+git.5fdd2d6-150600.3.8.1SUSE-SU-2025:0601-1
SUSELinux Enterprise Module for HPC 15 SP6apptainer1.3.6-150600.4.9.1SUSE-SU-2025:0980-1
SUSELinux Enterprise Module for Package Hub 15 SP6golang-github-prometheus-promu0.17.0-150000.3.24.1SUSE-SU-2025:0525-1
SUSELinux Enterprise Module for Package Hub 15 SP6govulncheck-vulndb0.0.20250226T025151-150000.1.35.1SUSE-SU-2025:0770-1
SUSELinux Enterprise Module for Package Hub 15 SP6grafana10.4.13-150200.3.59.1SUSE-SU-2025:0545-1
SUSELinux Enterprise Module for Public Cloud 12google-guest-agent20250327.01-1.50.1SUSE-SU-2025:1142-1
20 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.6apptainer1.3.6-150600.4.9.1SUSE-SU-2025:0980-1
openSUSELeap 15.6brise20230603+git.5fdd2d6-150600.3.8.1SUSE-SU-2025:0601-1
openSUSELeap 15.6cheat4.4.2-bp156.3.3.1openSUSE-SU-2025:0025-1
openSUSELeap 15.6dracut-saltboot0.1.1728559936.c16d4fb-150000.1.56.1SUSE-SU-2025:0525-1
openSUSELeap 15.6gitea-tea0.9.2-bp156.5.1openSUSE-SU-2025:0094-1
openSUSELeap 15.6golang-github-prometheus-promu0.17.0-150000.3.24.1SUSE-SU-2025:0525-1
openSUSELeap 15.6google-guest-agent20250327.01-150000.1.60.1SUSE-SU-2025:1143-1
openSUSELeap 15.6govulncheck-vulndb0.0.20250226T025151-150000.1.35.1SUSE-SU-2025:0770-1
openSUSELeap 15.6grafana10.4.13-150200.3.59.1SUSE-SU-2025:0545-1
openSUSELeap 15.6helm3.17.1-150000.1.41.1SUSE-SU-2025:0602-1
openSUSELeap 15.6kubevirt1.4.1-150600.5.24.1SUSE-SU-2025:03278-1
openSUSELeap 15.6spacecmd5.0.11-150000.3.130.1SUSE-SU-2025:0525-1
34 more for openSUSE in the JSON and on openSUSE's page.
Alpinev3.22, v3.23, v3.24rclone1.69.0-r0ALPINE-CVE-2024-45337
Azure Linux2cert-manager1.11.2-16AZL-54317
Azure Linux2moby-compose2.17.3-9AZL-54286
Azure Linux2moby-engine24.0.9-13AZL-54320
Azure Linux2packer1.9.5-5AZL-54290
Azure Linux2podmanno fix listedAZL-54315
Azure Linux2telegraf1.29.4-10AZL-54281
Azure Linux3cert-manager1.12.13-2AZL-54372
Azure Linux3cf-cli8.7.3-4AZL-54327
Azure Linux3cri-ono fix listedAZL-54353
Azure Linux3docker-buildx0.14.0-2AZL-54345
Azure Linux3docker-compose2.27.0-2AZL-54381
Azure Linux3gh2.62.0-3AZL-54384
4 more for Azure Linux in the JSON.

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This vulnerability is classified as important rather than critical because it does not directly enable unauthorized access but rather introduces a risk of authorization bypass if the application or library misuses the PublicKeyCallback API. The vulnerability relies on incorrect assumptions made by the application when handling the sequence or state of keys provided during SSH authentication. Properly implemented systems that use the Permissions field or avoid relying on external state remain unaffected. Additionally, the vulnerability does not allow direct exploitation to gain control over a system without the presence of insecure logic in the application's handling of authentication attempts.

Red Hat Enterprise Linux(RHEL) 8 & 9 and Red Hat Openshift marked as not affected as it was determined that the problem function `ServerConfig.PublicKeyCallback`, as noted in the CVE-2024-45337 issue, is not called by Podman, Buildah, containers-common, or the gvisor-tap-vsock projects.

ProductPackageStateAdvisory
gatekeeper 3.14 for RHEL 9gatekeeper/gatekeeper-operator-bundle:v3.14.3-3Fixed 2025-02-12RHSA-2025:1333
gatekeeper 3.14 for RHEL 9gatekeeper/gatekeeper-rhel9:v3.14.2-8Fixed 2025-02-12RHSA-2025:1333
gatekeeper 3.14 for RHEL 9gatekeeper/gatekeeper-rhel9-operator:v3.14.3-2Fixed 2025-02-12RHSA-2025:1333
gatekeeper 3.15 for RHEL 9gatekeeper/gatekeeper-operator-bundle:v3.15.3-2Fixed 2025-02-12RHSA-2025:1332
gatekeeper 3.15 for RHEL 9gatekeeper/gatekeeper-rhel9:v3.15.1-26Fixed 2025-02-12RHSA-2025:1332
gatekeeper 3.15 for RHEL 9gatekeeper/gatekeeper-rhel9-operator:v3.15.3-1Fixed 2025-02-12RHSA-2025:1332
gatekeeper 3.17 for RHEL 9gatekeeper/gatekeeper-operator-bundle:v3.17.1-6Fixed 2025-02-12RHSA-2025:1331
gatekeeper 3.17 for RHEL 9gatekeeper/gatekeeper-rhel9:v3.17.1-7Fixed 2025-02-12RHSA-2025:1331
gatekeeper 3.17 for RHEL 9gatekeeper/gatekeeper-rhel9-operator:v3.17.1-5Fixed 2025-02-12RHSA-2025:1331
multicluster engine for Kubernetes 2.4 for RHEL 8multicluster-engine/addon-manager-rhel8:v2.4.7-6Fixed 2025-01-21RHSA-2025:0552
Builds for Red Hat OpenShiftopenshift-builds/openshift-builds-controller-rhel8Affected
Builds for Red Hat OpenShiftopenshift-builds/openshift-builds-controller-rhel9Affected
Builds for Red Hat OpenShiftopenshift-builds/openshift-builds-git-cloner-rhel8Will not fix
Builds for Red Hat OpenShiftopenshift-builds/openshift-builds-git-cloner-rhel9Affected
Builds for Red Hat OpenShiftopenshift-builds/openshift-builds-image-bundler-rhel8Will not fix
Builds for Red Hat OpenShiftopenshift-builds/openshift-builds-image-bundler-rhel9Affected
Builds for Red Hat OpenShiftopenshift-builds/openshift-builds-image-processing-rhel8Will not fix
Builds for Red Hat OpenShiftopenshift-builds/openshift-builds-image-processing-rhel9Affected
Builds for Red Hat OpenShiftopenshift-builds/openshift-builds-waiters-rhel8Will not fix
Builds for Red Hat OpenShiftopenshift-builds/openshift-builds-waiters-rhel9Affected
579 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-45337.

GitHub PoC (unverified)

Repositories on GitHub named after this CVE. Nobody has checked them and they are not scanned: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it.

  • ferralon-demo/gitea-cve-2024-45337 0 stars, Go, created
    Security case-study: reachability vs SCA on Gitea CVE-2024-45337 — real code reconstructed at historical commits (PoE → failed fix → fix). …

References

Check your stackJSON