Email me

Rust advisories / anchor-lang

Vulnerability HighRUSTSEC-2026-0146 · anchor-lang

RUSTSEC-2026-0146: `InterfaceAccount` allows account substitution between unexpected types

Short answerA security vulnerability in the anchor-lang crate: `InterfaceAccount` allows account substitution between unexpected types. GitHub rates it High. Fixed in 1.0.0-rc.2: update to a fixed version.

Crateanchor-lang
TypeVulnerability
Affected versionsFrom 1.0.0-rc.1 before 1.0.0-rc.2.
Fixed in1.0.0-rc.2
SeverityHigh (GitHub rating)
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
Published2026-05-08
Last changed2026-10-12
Also known asGHSA-429q-fhh4-r6hj

What to do

  1. See which version you have: cargo tree -i anchor-lang (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p anchor-lang. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example anchor-lang = "1.0.0-rc.2") or update the dependency that pulls it in.
  3. Check again with cargo audit, or paste your Cargo.lock into our Cargo.toml checker.

Details from the advisory

Affected versions of anchor-lang allowed InterfaceAccount to accept accounts with an unexpected Anchor discriminator. A change to InterfaceAccount caused checked deserialization to be bypassed for this account wrapper, so validation proved only that the account owner matched one of the accepted interface owners. It did not prove that the account data belonged to the expected account type.

Programs using InterfaceAccount rely on Anchor to enforce both owner and account-type validation before the handler runs. With discriminator checking disabled, an attacker could pass another account type owned by an accepted program and have it deserialized through the expected interface wrapper. This could bypass account-type assumptions made by the program and lead to incorrect authorization or state handling.

The issue was fixed in anchor-lang 1.0.0-rc.2 by restoring checked deserialization for InterfaceAccount::try_from, while keeping explicitly unchecked behavior available only through the unchecked API. Users should upgrade to anchor-lang 1.0.0-rc.2 or later.

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Other advisories for anchor-lang

Full security history of anchor-lang

Up next

Same crateanchor-lang: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ