{"id":"GHSA-429q-fhh4-r6hj","aliases":["RUSTSEC-2026-0146"],"status":"published","title":"Anchor: `InterfaceAccount` allows account substitution between unexpected types","description":"### Impact\nAny uses of `InterfaceAccount` allows another unexpected account type to be passed, after https://github.com/solana-foundation/anchor/pull/3837 disabled discriminator checking for this type.\n\nThe bug was originally reported and fixed in https://github.com/solana-foundation/anchor/pull/4139, see that PR for more details.\n\n### Patches\nhttps://github.com/solana-foundation/anchor/pull/4139 patched the issue and was released in `1.0.0-rc.2`. Users should upgrade to the latest released version of Anchor 1.0.\n\n### References\nBug landed in: https://github.com/solana-foundation/anchor/pull/3837\nBug fixed in: https://github.com/solana-foundation/anchor/pull/4139","severity":{"version":"4.0","score":8.7,"vector":"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","level":"high","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20"],"published":"2026-05-08T12:00:00Z","modified":"2026-10-12T18:00:08Z","fixes":[{"ecosystem":"crates.io","package":"anchor-lang","fixed_in":["1.0.0-rc.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"anchor-lang","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.0.0-rc.1"},{"last_affected":"1.0.0-rc.1"},{"fixed":"1.0.0-rc.2"}]}],"versions":["1.0.0-rc.1"]},{"source":"osv","ecosystem":"crates.io","package":"anchor-lang","ranges":[{"type":"SEMVER","events":[{"introduced":"1.0.0-rc.1"},{"fixed":"1.0.0-rc.2"}]}],"versions":["1.0.0-rc.1"]},{"source":"osv","ecosystem":"crates.io","package":"anchor-lang","ranges":[{"type":"SEMVER","events":[{"introduced":"1.0.0-rc.1"},{"fixed":"1.0.0-rc.2"}]}]}],"references":[{"url":"https://github.com/solana-foundation/anchor/security/advisories/GHSA-429q-fhh4-r6hj","tags":["web"]},{"url":"https://github.com/solana-foundation/anchor/pull/3837","tags":["web"]},{"url":"https://github.com/solana-foundation/anchor/pull/4139","tags":["web"]},{"url":"https://github.com/solana-foundation/anchor/commit/26ef36968a62e28a1f028e7adae4806af30c747d","tags":["web"]},{"url":"https://github.com/otter-sec/anchor/security/advisories/GHSA-429q-fhh4-r6hj","tags":["web"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0146.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-429q-fhh4-r6hj"},{"url":"https://github.com/solana-foundation/anchor","tags":["package"]},{"url":"https://crates.io/crates/anchor-lang","tags":["package"]},{"url":"https://github.com/otter-sec/anchor/pull/3837","tags":["web"]},{"url":"https://github.com/otter-sec/anchor/pull/4139","tags":["web"]},{"url":"https://github.com/otter-sec/anchor/commit/26ef36968a62e28a1f028e7adae4806af30c747d","tags":["web"]}],"sources":{"ghsa":[{"id":"GHSA-429q-fhh4-r6hj","title":"Anchor: `InterfaceAccount` allows account substitution between unexpected types","description":"### Impact\nAny uses of `InterfaceAccount` allows another unexpected account type to be passed, after https://github.com/solana-foundation/anchor/pull/3837 disabled discriminator checking for this type.\n\nThe bug was originally reported and fixed in https://github.com/solana-foundation/anchor/pull/4139, see that PR for more details.\n\n### Patches\nhttps://github.com/solana-foundation/anchor/pull/4139 patched the issue and was released in `1.0.0-rc.2`. Users should upgrade to the latest released version of Anchor 1.0.\n\n### References\nBug landed in: https://github.com/solana-foundation/anchor/pull/3837\nBug fixed in: https://github.com/solana-foundation/anchor/pull/4139","status":"published","published":"2026-05-13T15:33:46Z","modified":"2026-05-19T20:18:36Z","cvss":[{"version":"4.0","score":8.7,"vector":"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","level":"high"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:40:12.430932Z"}],"osv":[{"id":"GHSA-429q-fhh4-r6hj","title":"Anchor: `InterfaceAccount` allows account substitution between unexpected types","description":"### Impact\nAny uses of `InterfaceAccount` allows another unexpected account type to be passed, after https://github.com/solana-foundation/anchor/pull/3837 disabled discriminator checking for this type.\n\nThe bug was originally reported and fixed in https://github.com/solana-foundation/anchor/pull/4139, see that PR for more details.\n\n### Patches\nhttps://github.com/solana-foundation/anchor/pull/4139 patched the issue and was released in `1.0.0-rc.2`. Users should upgrade to the latest released version of Anchor 1.0.\n\n### References\nBug landed in: https://github.com/solana-foundation/anchor/pull/3837\nBug fixed in: https://github.com/solana-foundation/anchor/pull/4139","status":"published","published":"2026-05-13T15:33:46Z","modified":"2026-05-19T20:30:23.692156902Z","cvss":[{"version":"4.0","score":8.7,"vector":"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","level":"high"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T15:46:36.434231Z"},{"id":"RUSTSEC-2026-0146","title":"`InterfaceAccount` allows account substitution between unexpected types","description":"Affected versions of `anchor-lang` allowed `InterfaceAccount` to accept accounts\nwith an unexpected Anchor discriminator. A change to `InterfaceAccount` caused\nchecked deserialization to be bypassed for this account wrapper, so validation\nproved only that the account owner matched one of the accepted interface owners.\nIt did not prove that the account data belonged to the expected account type.\n\nPrograms using `InterfaceAccount` rely on Anchor to enforce both owner and\naccount-type validation before the handler runs. With discriminator checking\ndisabled, an attacker could pass another account type owned by an accepted\nprogram and have it deserialized through the expected interface wrapper. This\ncould bypass account-type assumptions made by the program and lead to incorrect\nauthorization or state handling.\n\nThe issue was fixed in `anchor-lang` 1.0.0-rc.2 by restoring checked\ndeserialization for `InterfaceAccount::try_from`, while keeping explicitly\nunchecked behavior available only through the unchecked API. Users should\nupgrade to `anchor-lang` 1.0.0-rc.2 or later.","status":"published","published":"2026-05-08T12:00:00Z","modified":"2026-10-12T18:00:08.341270961Z","cvss":[{"version":"4.0","score":8.7,"vector":"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","level":"high"}],"updated_at":"2026-11-02T15:53:40.430679Z"}]}}
