Advisory

RUSTSEC-2026-0146

Also known as: GHSA-429q-fhh4-r6hj

Summary

InterfaceAccount allows account substitution between unexpected types

Details

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.

Severity

Not rated by the source.

Dates

Published
2026-05-08 12:00 UTC
Modified
2026-10-12 18:00 UTC

Affected packages and fixes

anchor-lang

crates.io · All systems

Affected

  • introduced 1.0.0-rc.1, fixed 1.0.0-rc.2 (semver)

Fixed versions

1.0.0-rc.2

Fix

  • Fixed version 1.0.0-rc.2
    cargo update -p anchor-lang --precise 1.0.0-rc.2

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC BY 4.0

This record names its own licence, CC BY 4.0, which differs from the source's (CC0-1.0).

Sources & licences