{"answers":{"affected":"1 open source package ship an affected version, including mykey.","exploited":"There is no known exploitation of RUSTSEC-2026-0336 in the wild and no public exploit code.","fix":"Upgrade mykey to 2.0.0 or later.","what":"RUSTSEC-2026-0336 is a vulnerability in mykey, published on 9 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for RUSTSEC-2026-0336 and fix it if it is affected.\n\nWhat it is: RUSTSEC-2026-0336 is a vulnerability in mykey, published on 9 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of RUSTSEC-2026-0336 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- mykey (crates.io): affected from 0.0.0-0; fixed in 2.0.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/RUSTSEC-2026-0336/ (Markdown: https://insights.sbomify.com/RUSTSEC-2026-0336/index.md)","id":"RUSTSEC-2026-0336","markdown":"https://insights.sbomify.com/RUSTSEC-2026-0336/index.md","name":"RUSTSEC-2026-0336","record":{"aliases":["GHSA-xq78-wvcv-hqvj"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["security_bypass","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Rust MIKEY library","requires_auth":"none","summary":"Attackers can forge MIKEY messages because the library fails to verify MACs, bypassing integrity checks and authentication in SRTP key exchange.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"`mykey` implements MIKEY (RFC 3830) for SRTP key exchange. No receive path\nverified the MIKEY message authentication code.\n\n`crypto::verify_mac` existed and was correct, but it was called only from unit\ntests — neither `MikeyMessage::from_bytes` nor `MikeyMessage::complete_psk`\ninvoked it.\n\n`new_psk_init` computed an HMAC-SHA-1-160 over the serialized message and\nappended it, so the tag was present on the wire and looked like integrity\nprotection. It was decorative: a receiver accepted any message regardless of\nwhether the MAC was correct, wrong, or absent.\n\n## Consequences\n\n- An attacker able to inject or modify MIKEY messages in transit faced no\n  integrity check. Modified RAND, SSRC or security-policy payloads were accepted\n  silently. Note that this does not require a man-in-the-middle position: since\n  nothing was checked, a wholly forged PSK-Init was accepted.\n- Pre-shared key mode therefore provided no mutual authentication, despite the\n  documentation claiming that it did. Possession of the pre-shared key was never\n  actually proven by either party.\n- Replayed init messages were not rejected.\n\nThe practical severity was bounded by GHSA-fwjg-cm92-j3hj (cleartext TGK), which\nalready let a passive observer recover the key material outright without needing\nto forge anything.\n\n## The fix\n\n`complete_psk` now verifies the message MAC **before** any decryption, so a\nmessage that fails authentication yields no key material at all. A `MacAlg::Null`\npayload, an absent MAC and a truncated MAC are each refused rather than treated\nas \"no check required\".\n\nThe authentication key is now derived from the pre-shared key per RFC 3830 §4.1.4\nrather than from the TGK — a prerequisite, since verifying against a TGK-derived\nkey would have been circular while the TGK travelled in the message itself.\nOptional §6.9 verification messages were also added, giving the exchange genuine\nmutual authentication.\n\nReplay protection is still absent: a captured PSK-Init can be replayed and will\nbe accepted, because the optional COUNTER timestamp is emitted rather than a\nmandatory NTP type and no record of seen timestamps or RAND values is kept. That\ngap is tracked at \u003chttps://github.com/waxspin/mykey/issues/24\u003e and is not covered\nby this advisory.\n\n## Workarounds\n\nTreat parsed MIKEY messages as unauthenticated input: do not rely on pre-shared\nkey mode for peer authentication or message integrity, and carry it over a\ntransport that provides both.","ecosystems":["crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"MIKEY message MAC is never verified on receive, so forged messages are accepted","id":"RUSTSEC-2026-0336","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"security_feature_bypass","year":"2026"},"n_packages":1,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["2.0.0"],"introduced":["0.0.0-0"],"last_affected":[],"package":"mykey","purl":"pkg:cargo/mykey","source":"RUSTSEC-2026-0336"}],"products":null,"published":"2026-10-09","related":[],"sources":[{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can forge MIKEY messages because the library fails to verify MACs, bypassing integrity checks and authentication in SRTP key exchange.","url":"https://insights.sbomify.com/RUSTSEC-2026-0336/"}