CVE-2024-45337
Misuse of connection.serverAuthenticate may cause authorization bypass in golang.org/x/crypto
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.
Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.
Severity and exploitation evidence
EPSS: 3.788% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.
CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T16:25:55.090Z. Public exploit availability is not used to set this status.
Verification by field
| Field | Status | Checked at (UTC) | Source |
|---|---|---|---|
| kev | verified | 2026-11-19T16:25:55.090Z | CISA KEV |
| cvss | unknown | unknown | unknown |
| epss | verified | 2026-11-19T16:04:39.116Z | FIRST EPSS |
| patches | verified | 2026-11-19T12:52:36.954Z | OSV |
| affected | verified | 2026-11-19T12:57:17.818Z | CVE Program |
| lifecycle | verified | 2026-11-19T12:57:17.818Z | CVE Program |
Affected versions and configuration
golang.org/x/crypto golang.org/x/crypto/ssh; default status: unaffected: 0 to < 0.31.0 [affected; scheme: semver]
Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.
CVE Program · cve-json · full conditions
{
"affected": [
{
"vendor": "golang.org/x/crypto",
"product": "golang.org/x/crypto/ssh",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "0.31.0",
"versionType": "semver"
}
],
"packageName": "golang.org/x/crypto/ssh",
"collectionURL": "https://pkg.go.dev",
"defaultStatus": "unaffected",
"programRoutines": [
{
"name": "ServerConfig.PublicKeyCallback"
},
{
"name": "connection.serverAuthenticate"
},
{
"name": "NewServerConn"
}
]
}
],
"additionalContainers": [
{
"title": "CVE Program Container",
"references": [
{
"url": "http://www.openwall.com/lists/oss-security/2024/12/11/2"
},
{
"url": "https://security.netapp.com/advisory/ntap-20250131-0007/"
}
],
"providerMetadata": {
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE",
"dateUpdated": "2025-01-31T15:02:46.088Z"
}
},
{
"title": "CISA ADP Vulnrichment",
"metrics": [
{
"cvssV3_1": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 9.1,
"attackVector": "NETWORK",
"baseSeverity": "CRITICAL",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "HIGH"
}
},
{
"other": {
"type": "ssvc",
"content": {
"id": "CVE-2024-45337",
"role": "CISA Coordinator",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "yes"
},
{
"Technical Impact": "total"
}
],
"version": "2.0.3",
"timestamp": "2024-12-12T17:57:55.896008Z"
}
}
}
],
"providerMetadata": {
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP",
"dateUpdated": "2024-12-12T17:58:29.810Z"
}
}
]
}Archived source JSONOSV · osv · full conditions
{
"id": "GHSA-v778-237x-gjrc",
"aliases": [
"CVE-2024-45337",
"GO-2024-3321"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "0.31.0"
}
]
}
],
"package": {
"name": "golang.org/x/crypto",
"purl": "pkg:golang/golang.org/x/crypto",
"ecosystem": "Go"
},
"versions": [],
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-v778-237x-gjrc/GHSA-v778-237x-gjrc.json"
}
}
],
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
}
],
"upstream": [],
"withdrawn": null,
"references": [
{
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-45337",
"type": "ADVISORY"
},
{
"url": "https://github.com/golang/crypto/commit/b4f1988a35dee11ec3e05d6bf3e90b695fbd8909",
"type": "WEB"
},
{
"url": "https://github.com/golang/crypto",
"type": "PACKAGE"
},
{
"url": "https://go.dev/cl/635315",
"type": "WEB"
},
{
"url": "https://go.dev/issue/70779",
"type": "WEB"
},
{
"url": "https://groups.google.com/g/golang-announce/c/-nPEi39gI4Q/m/cGVPJCqdAQAJ",
"type": "WEB"
},
{
"url": "https://pkg.go.dev/vuln/GO-2024-3321",
"type": "WEB"
},
{
"url": "https://security.netapp.com/advisory/ntap-20250131-0007",
"type": "WEB"
},
{
"url": "http://www.openwall.com/lists/oss-security/2024/12/11/2",
"type": "WEB"
}
],
"relatedGitRanges": [],
"database_specific": {
"cwe_ids": [
"CWE-285"
],
"severity": "CRITICAL",
"github_reviewed": true,
"nvd_published_at": "2024-12-12T02:02:07Z",
"github_reviewed_at": "2024-12-11T22:03:04Z"
}
}Archived source JSONOSV · osv · full conditions
{
"id": "GO-2024-3321",
"aliases": [
"CVE-2024-45337",
"GHSA-v778-237x-gjrc"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "0.31.0"
}
]
}
],
"package": {
"name": "golang.org/x/crypto",
"purl": "pkg:golang/golang.org/x/crypto",
"ecosystem": "Go"
},
"versions": [],
"database_specific": {
"source": "https://vuln.go.dev/ID/GO-2024-3321.json"
},
"ecosystem_specific": {
"imports": [
{
"path": "golang.org/x/crypto/ssh",
"symbols": [
"NewServerConn",
"ServerConfig.PublicKeyCallback",
"connection.serverAuthenticate"
]
}
]
}
}
],
"severity": [],
"upstream": [],
"withdrawn": null,
"references": [
{
"url": "https://github.com/golang/crypto/commit/b4f1988a35dee11ec3e05d6bf3e90b695fbd8909",
"type": "FIX"
},
{
"url": "https://go.dev/cl/635315",
"type": "FIX"
},
{
"url": "https://go.dev/issue/70779",
"type": "REPORT"
},
{
"url": "https://groups.google.com/g/golang-announce/c/-nPEi39gI4Q/m/cGVPJCqdAQAJ",
"type": "WEB"
}
],
"relatedGitRanges": [],
"database_specific": {
"url": "https://pkg.go.dev/vuln/GO-2024-3321",
"review_status": "REVIEWED"
}
}Archived source JSONCorrection evidence
Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.
| Evidence type | Distribution / release | Package | Channel | Version or source note | Source |
|---|---|---|---|---|---|
| ecosystem-boundary | Go / package | golang.org/x/crypto | Not a distribution channel | 0.31.0 | Official record |
Vendor notices and operational guidance
No connected vendor notice is available for this record.
Original sources and dates
- OSVConsulted: 2026-11-19T12:52:36.954ZArchived source JSON
Source publication: 2024-12-11T22:03:04.000Z
Source modification: 2026-09-10T03:50:56.265ZDocument fingerprint
a32426225c1cf2a1ef21f83f6d667c7e3375c73249acdd2713963004c67fad7d - OSVConsulted: 2026-11-19T12:52:36.954ZArchived source JSON
Source publication: 2024-12-11T18:40:19.000Z
Source modification: 2026-11-14T13:12:14.718ZDocument fingerprint
a32426225c1cf2a1ef21f83f6d667c7e3375c73249acdd2713963004c67fad7d - CVE ProgramConsulted: 2026-11-19T12:57:17.818ZArchived source JSON
Source publication: 2024-12-11T18:55:58.506Z
Source modification: 2025-02-18T20:48:40.404ZDocument fingerprint
20f20b5c3eeb8bc02f20de78982693f5fad5c3e9a16269f681bea9717029c8f1 - CISA KEVConsulted: 2026-11-19T16:25:55.090ZArchived source JSON
Source publication: not supplied
Source modification: 2026-11-18T19:17:41.0354ZDocument fingerprint
a35fdc67c7d9802988dcfc1d3ff1198da327948d1db122ab7692ac201055ac56 - FIRST EPSSConsulted: 2026-11-19T16:04:39.116ZArchived source JSON
Source publication: not supplied
Source modification: not suppliedDocument fingerprint
9f0dcd79a206c1e9df7af3ccc3246b94763cde2daafc074aaa6c06dadb41d7a7
Official status history
- UNKNOWN → PUBLISHED · · evidence