{"answers":{"affected":"1 open source package ship an affected version, including bip322.","exploited":"There is no known exploitation of RUSTSEC-2026-0334 in the wild and no public exploit code.","fix":"Upgrade bip322 to 0.0.11 or later.","what":"RUSTSEC-2026-0334 is an authentication bypass vulnerability in bip322, published on 14 Aug 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-0334 and fix it if it is affected.\n\nWhat it is: RUSTSEC-2026-0334 is an authentication bypass vulnerability in bip322, published on 14 Aug 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-0334 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- bip322 (crates.io): affected from 0.0.6; fixed in 0.0.11\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-0334/ (Markdown: https://insights.sbomify.com/RUSTSEC-2026-0334/index.md)","id":"RUSTSEC-2026-0334","markdown":"https://insights.sbomify.com/RUSTSEC-2026-0334/index.md","name":"RUSTSEC-2026-0334","record":{"aliases":["GHSA-5chw-87w3-j9cv"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["security_bypass","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"Bitcoin BIP-322 library","requires_auth":"none","summary":"Attackers can bypass Bitcoin address ownership verification for P2WPKH addresses by signing challenges with their own key, leading to authentication bypass.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"Affected versions of `bip322` accepted a BIP-322 proof created with an\nattacker-controlled private key as a valid signature for an unrelated victim\nP2WPKH or P2SH-P2WPKH address, allowing complete authentication bypass in\napplications using `verify_simple`, `verify_simple_encoded`, `verify_full`, or\n`verify_full_encoded` as proof that a user controls a Bitcoin address.\n\nIn `verify_full`, the verifier obtained the public key from the\ncaller-controlled witness and passed it to `verify_full_p2wpkh`, where the\nsupposed public-key mismatch check read the key from the same witness and\ncompared it with itself:\n\n```rust\nlet witness_pub_key = \u0026witness.to_vec()[1];\n\nif \u0026pub_key.to_bytes() != witness_pub_key {\n    return Err(Error::PublicKeyMismatch);\n}\n```\n\nSince `pub_key` was originally parsed from that exact witness element, this\ncomparison was tautological. The code verified that the signature was valid\nfor the public key embedded in the witness, but never verified that this\npublic key hashes to the claimed address, violating BIP-322's requirement\nthat the `message_signature` satisfy the `message_challenge` (the claimed\naddress's scriptPubKey).\n\nAs a result, an attacker could select any victim P2WPKH or P2SH-P2WPKH\naddress, construct the BIP-322 challenge for that address and message, sign\nit with their own unrelated private key, and have the proof accepted. No\nvictim key or victim interaction was required. Application-level nonces do\nnot mitigate this, since the attacker can construct and sign the current\nchallenge message with their own key.\n\nP2TR verification is not affected: the public key is derived from the\naddress's witness program rather than from the caller-controlled witness.\n\nThe flaw was corrected in commit\n[e8accbe](https://github.com/rust-bitcoin/bip322/commit/e8accbe7d39f48f030e44f333b4796e28f6aad80)\nby deriving the expected scriptPubKey from the witness public key\n(`P2WPKH(HASH160(pubkey))`, wrapped in P2SH for the nested case) and\nrequiring it to exactly equal the scriptPubKey of the claimed address before\nsignature verification, failing with `Error::PublicKeyMismatch` otherwise.\nThe fix is included in version\n[0.0.11](https://crates.io/crates/bip322/0.0.11). Affected versions 0.0.6\nthrough 0.0.10 have been yanked from crates.io.\n\nThere is no known workaround that mitigates the vulnerability. Upgrading to\nversion 0.0.11 is the recommended course of action.","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":"BIP-322 address ownership verification bypass for P2WPKH and P2SH-P2WPKH addresses","id":"RUSTSEC-2026-0334","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"auth_bypass","year":"2026"},"n_packages":1,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["0.0.11"],"introduced":["0.0.6"],"last_affected":[],"package":"bip322","purl":"pkg:cargo/bip322","source":"RUSTSEC-2026-0334"}],"products":null,"published":"2026-08-14","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 bypass Bitcoin address ownership verification for P2WPKH addresses by signing challenges with their own key, leading to authentication bypass.","url":"https://insights.sbomify.com/RUSTSEC-2026-0334/"}