{"id":"EUVD-2026-36126","revision":null,"records":[{"revision":"e9b2243b0f5642d99563fccf968f332b","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-46705","aliases":[],"title":"russh server userauth state is not reset when authentication principal changes","description":"Russh is a Rust SSH client & server library. From version 0.34.0-beta.1 to before version 0.61.0, the russh server authentication path keeps internal userauth state across SSH_MSG_USERAUTH_REQUEST messages without separating that state when the request principal changes. RFC 4252 allows the user name and service name fields to change between authentication requests. The issue is not that such changes are invalid. The issue is that russh-owned authentication state, such as remaining methods, partial-success state, and in-progress method state, can remain associated with the connection and then influence a later request for a different (user, service). This is an internal library state mismatch. This issue has been patched in version 0.61.0.","state":0,"publishedAt":"2026-06-10T20:21:35.177+00:00","modifiedAt":"2026-06-11T14:14:16.876+00:00","affected":[{"ecosystem":"Vendor product","name":"russh","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"Eugeny\",\n                    \"product\": \"russh\",\n                    \"versions\": [\n                        {\n                            \"version\": \">= 0.34.0-beta.1, < 0.61.0\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"severity":"MEDIUM"}],"references":["https://github.com/Eugeny/russh/security/advisories/GHSA-hpv4-5h6f-wqr3"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-46705","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-46705","identifiers":["CVE-2026-46705"]},"retained":false,"historicalAffected":[]},{"revision":"fb53a4df593f4982ad37bb2d2a22345d","observedAt":"2026-11-14T00:10:20.649+00:00","statement":{"source":"euvd","id":"EUVD-2026-36126","aliases":["CVE-2026-46705","GHSA-hpv4-5h6f-wqr3"],"title":"Russh is a Rust SSH client & server library. From version 0.34.0-beta.1 to before version 0.61.0, the russh server authentication path keeps internal userauth state across SSH_MSG_USERAUTH_REQUEST messages without separating that state when…","description":"Russh is a Rust SSH client & server library. From version 0.34.0-beta.1 to before version 0.61.0, the russh server authentication path keeps internal userauth state across SSH_MSG_USERAUTH_REQUEST messages without separating that state when the request principal changes. RFC 4252 allows the user name and service name fields to change between authentication requests. The issue is not that such changes are invalid. The issue is that russh-owned authentication state, such as remaining methods, partial-success state, and in-progress method state, can remain associated with the connection and then influence a later request for a different (user, service). This is an internal library state mismatch. This issue has been patched in version 0.61.0.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"severity":null}],"references":["https://github.com/Eugeny/russh/security/advisories/GHSA-hpv4-5h6f-wqr3"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-36126","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jun 10, 2026, 8:21:35 PM","dateUpdated":"Jun 11, 2026, 2:14:16 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-36126","identifiers":["EUVD-2026-36126","CVE-2026-46705","GHSA-hpv4-5h6f-wqr3"]},"retained":false,"historicalAffected":[]},{"revision":"9313ba685e3b44f9b04e37290b8889c3","observedAt":"2026-10-25T12:17:20.277+00:00","statement":{"source":"nvd","id":"CVE-2026-46705","aliases":[],"title":"Russh is a Rust SSH client & server library. From version 0.34.0-beta.1 to before version 0.61.0, the russh server authentication path keeps internal userauth state across SSH_MSG_USERAUTH_REQUEST messages without separating that state when…","description":"Russh is a Rust SSH client & server library. From version 0.34.0-beta.1 to before version 0.61.0, the russh server authentication path keeps internal userauth state across SSH_MSG_USERAUTH_REQUEST messages without separating that state when the request principal changes. RFC 4252 allows the user name and service name fields to change between authentication requests. The issue is not that such changes are invalid. The issue is that russh-owned authentication state, such as remaining methods, partial-success state, and in-progress method state, can remain associated with the connection and then influence a later request for a different (user, service). This is an internal library state mismatch. This issue has been patched in version 0.61.0.","state":0,"publishedAt":"2026-06-10T22:17:00.713+00:00","modifiedAt":"2026-07-23T09:10:00.113+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"severity":"MEDIUM"}],"references":["https://github.com/Eugeny/russh/security/advisories/GHSA-hpv4-5h6f-wqr3"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-46705","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-287"],"productCriteria":[],"sourceDates":{"published":"2026-06-10T22:17:00.713","lastModified":"2026-07-23T09:10:00.113"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-46705","identifiers":["CVE-2026-46705"]},"retained":false,"historicalAffected":[]},{"revision":"7c79cfad613e4a888bfaba06707d649c","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-hpv4-5h6f-wqr3","aliases":["CVE-2026-46705"],"title":"russh server userauth state is not reset when authentication principal changes","description":"### Summary\nThe `russh` server authentication path keeps internal userauth state across `SSH_MSG_USERAUTH_REQUEST` messages without separating that state when the request principal changes.\n\nRFC 4252 allows the `user name` and `service name` fields to change between authentication requests. The issue is not that such changes are invalid. The issue is that russh-owned authentication state, such as remaining methods, partial-success state, and in-progress method state, can remain associated with the connection and then influence a later request for a different `(user, service)`.\n\nThis is an internal library state mismatch. Applications are responsible for any authentication state they keep in their own handlers, but russh must reset or separate state that russh itself owns.\n\n### Details\nThe relevant server-side auth logic is in:\n\n- `russh/src/server/encrypted.rs`\n- `russh/src/auth.rs`\n\nRFC 4252 section 5 says the `user name` and `service name` fields are repeated in every `SSH_MSG_USERAUTH_REQUEST` and may change. It also says the server implementation must check those fields in every message and flush accumulated authentication state if they change; if it cannot flush that state, it must disconnect.\n\nIn vulnerable `russh` code, the username and service are decoded from each `SSH_MSG_USERAUTH_REQUEST`, while the `AuthRequest` state remains connection-scoped. That state includes:\n\n- `methods`, which is later encoded as the `SSH_MSG_USERAUTH_FAILURE` remaining-methods list.\n- `partial_success`, which is later encoded in `SSH_MSG_USERAUTH_FAILURE`.\n- `current`, which tracks in-progress method state such as public-key offer or keyboard-interactive challenge state.\n- `rejection_count`.\n\nIf one request narrows russh's internal `methods` set, a later request for a different user can observe that narrowed set unless the internal state is reset at the principal boundary.\n\n### PoC\nThe PoC demonstrates only russh-owned state. The handler does not store any cross-request state. Alice's request narrows russh's remaining methods to `password`; Bob's later plain reject should not reuse that internal state.\n\n```rust\nstruct RemainingMethodsUserSwitchServer;\n\nimpl server::Handler for RemainingMethodsUserSwitchServer {\n    type Error = russh::Error;\n\n    async fn auth_none(&mut self, user: &str) -> Result<server::Auth, Self::Error> {\n        if user == \"alice\" {\n            Ok(server::Auth::Reject {\n                proceed_with_methods: Some(MethodSet::from(&[MethodKind::Password][..])),\n                partial_success: true,\n            })\n        } else {\n            Ok(server::Auth::reject())\n        }\n    }\n}\n\n#[tokio::test]\nasync fn auth_does_not_carry_remaining_methods_across_username_change() {\n    let alice = session.authenticate_none(\"alice\").await.unwrap();\n\n    assert!(matches!(\n        alice,\n        client::AuthResult::Failure {\n            ref remaining_methods,\n            ..\n        } if *remaining_methods == MethodSet::from(&[MethodKind::Password][..])\n    ));\n\n    let bob = session.authenticate_none(\"bob\").await.unwrap();\n\n    if let client::AuthResult::Failure {\n        remaining_methods, ..\n    } = bob {\n        assert!(\n            remaining_methods.contains(&MethodKind::PublicKey),\n            \"server reused Alice's narrowed remaining methods for Bob: {remaining_methods:?}\"\n        );\n    }\n}\n```\n\nOn `upstream/main`, this fails with:\n\n```text\nserver reused Alice's narrowed remaining methods for Bob: MethodSet([Password])\n```\n\nThat failure is produced by russh's retained `AuthRequest.methods`; it does not depend on handler-owned MFA/session state.\n\n### Impact\nSuggested provisional CVSS v3.1:\n\n- `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`\n- Score: `5.3`\n\nReasoning:\n\n- `AV:N`: reachable by a remote SSH client during authentication.\n- `AC:L`: the attack is a normal sequence of SSH user-auth packets.\n- `PR:N`: the attacker does not need an already-authenticated SSH session.\n- `UI:N`: no user interaction is required on the server side.\n- `S:U`: the impact is within the vulnerable SSH server implementation.\n- `C:N`: the narrow PoC does not disclose confidential data.\n- `I:L`: russh-owned authentication state for one principal can affect the authentication flow for a different principal.\n- `A:N`: the narrow PoC does not demonstrate an availability impact.\n\nThis report does not claim that username changes are inherently invalid, nor does it rely on application-owned authentication state being mishandled by the embedding server.\n\n### Fix / Patch Direction\nThe fix should update russh's internal userauth state handling so that accumulated russh-owned state is flushed or separated when `(user, service)` changes between `SSH_MSG_USERAUTH_REQUEST` messages.\n\nThe fix stores the last seen `(user, service)` on `AuthRequest`. When a new auth request arrives for a different principal, russh resets its internal auth state before dispatching the new request. This keeps username changes protocol-valid while preventing prior russh-owned auth state from carrying into the new principal.","state":0,"publishedAt":"2026-05-29T19:39:41+00:00","modifiedAt":"2026-09-10T03:51:05.8553946+00:00","affected":[{"ecosystem":"crates.io","name":"russh","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.34.0-beta.1"},{"kind":"fixed","version":"0.61.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/Eugeny/russh/security/advisories/GHSA-hpv4-5h6f-wqr3","https://nvd.nist.gov/vuln/detail/CVE-2026-46705","https://github.com/Eugeny/russh"],"sourceUrl":"https://github.com/advisories/GHSA-hpv4-5h6f-wqr3","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-hpv4-5h6f-wqr3","identifiers":["GHSA-hpv4-5h6f-wqr3","CVE-2026-46705"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-15T22:06:51.1007430+00:00","complete":true,"records":1781,"lastAttemptAt":"2026-11-15T22:06:51.100743+00:00","lastSuccessAt":"2026-11-15T22:06:54.7303583+00:00","error":null,"lastVerifiedAt":"2026-11-15T22:06:54.7304981+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-7de4d7559a5263003f03d9f70577ab06f92ba4178309f26fce53e22a4a959294-432f1e30e811bbcdd12c5c641e8ead812ba39ce1d3b007d149c671f3936cd84e","complete":true,"records":425849,"lastAttemptAt":"2026-11-15T22:06:26.3112172+00:00","lastSuccessAt":"2026-11-15T21:44:04.4669429+00:00","error":null,"lastVerifiedAt":"2026-11-15T22:06:26.3112172+00:00","snapshotPublishedAt":"2026-11-15T21:23:14+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-2f724ef221de4e8b98d3d3c650410173","complete":false,"records":13821,"lastAttemptAt":"2026-11-15T22:18:52.4193211+00:00","lastSuccessAt":"2026-11-15T22:18:52.403+00:00","error":null,"lastVerifiedAt":"2026-11-15T22:18:52.403+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13736,"expectedIdentifiers":13874,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-15T22:06:51.1007430+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-15T22:06:51.100743+00:00","lastSuccessAt":"2026-11-15T22:06:54.9921986+00:00","error":null,"lastVerifiedAt":"2026-11-15T22:06:54.9922004+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-56108f60675f4a03bfaf172e5aba4bda","complete":true,"records":13833,"lastAttemptAt":"2026-11-15T22:07:35.3330326+00:00","lastSuccessAt":"2026-11-15T22:07:35.331+00:00","error":null,"lastVerifiedAt":"2026-11-15T22:07:35.331+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13874,"expectedIdentifiers":13874,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-64eea06dbd27de8464d5dbce1b78cc794cc59e2d901516ae0d3ea76e624cdae0","complete":true,"records":9955,"lastAttemptAt":"2026-11-15T22:06:48.88405+00:00","lastSuccessAt":"2026-11-14T13:57:23.1208135+00:00","error":null,"lastVerifiedAt":"2026-11-15T22:06:48.88405+00:00","snapshotPublishedAt":"2026-11-14T13:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-15T22:06:40.5217694+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-15T22:06:40.5217694+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-6086d649bcb454cdf302d7d9275177bda73550e1b6e446b3520e9b6266d3582c","complete":true,"records":3148,"lastAttemptAt":"2026-11-15T22:06:50.7690607+00:00","lastSuccessAt":"2026-11-15T11:05:17.1034234+00:00","error":null,"lastVerifiedAt":"2026-11-15T22:06:50.7690607+00:00","snapshotPublishedAt":"2026-11-15T10:03:04+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-ff18f36f13fcca3a20a3fb9274b59b8872d18869a99071730e1e79b625c8f612","complete":true,"records":232475,"lastAttemptAt":"2026-11-15T22:06:41.5966683+00:00","lastSuccessAt":"2026-11-15T11:05:10.4195883+00:00","error":null,"lastVerifiedAt":"2026-11-15T22:06:41.5966683+00:00","snapshotPublishedAt":"2026-11-15T10:33:06+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}