GHSA-429q-fhh4-r6hj: Anchor `InterfaceAccount` Allows Account Substitution Between Vulnerability
HIGHGHSA-429q-fhh4-r6hj is a HIGH `interfaceaccount` allows account substitution between vulnerability (CWE-20: Improper Input Validation) affecting Anchor libraries in the crates.io ecosystem. The issue involves `interfaceaccount` allows account substitution between unexpected types. Remediation is available by upgrading affected packages to version 1.0.0-rc.2.
GHSA-429q-fhh4-r6hj at a Glance
How to Fix GHSA-429q-fhh4-r6hj
To remediate this vulnerability, upgrade all affected Anchor dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade anchor-lang to 1.0.0-rc.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for anchor-lang
How to Check if You Are Affected
To determine whether your application is affected by GHSA-429q-fhh4-r6hj, inspect your project dependencies for Anchor:
inspect dependencies for anchor-lang
Analyze the terminal output to locate any version of Anchor in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0-rc.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Anchor, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-429q-fhh4-r6hj Affected Anchor Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
anchor-lang
|
crates.io |
≥ 1.0.0-rc.1
< 1.0.0-rc.2
All 1 versions
1.0.0-rc.1
|
1.0.0-rc.2
|
References
Frequently Asked Questions
What is GHSA-429q-fhh4-r6hj?
Which Anchor versions are affected?
What version fixes GHSA-429q-fhh4-r6hj?
Is anchor-lang affected?
What CWE is associated with GHSA-429q-fhh4-r6hj?
How can I check crates.io dependencies for GHSA-429q-fhh4-r6hj?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-429q-fhh4-r6hj",
"modified" : "2026-05-19T20:18:35Z",
"published" : "2026-05-13T15:33:46Z",
"aliases" : [ ],
"summary" : "Anchor: `InterfaceAccount` allows account substitution between unexpected types",
"details" : "### 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" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "anchor-lang"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0-rc.1"
}, {
"fixed" : "1.0.0-rc.2"
} ]
} ],
"versions" : [ "1.0.0-rc.1" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/otter-sec/anchor/security/advisories/GHSA-429q-fhh4-r6hj"
}, {
"type" : "WEB",
"url" : "https://github.com/solana-foundation/anchor/security/advisories/GHSA-429q-fhh4-r6hj"
}, {
"type" : "WEB",
"url" : "https://github.com/solana-foundation/anchor/pull/3837"
}, {
"type" : "WEB",
"url" : "https://github.com/solana-foundation/anchor/pull/4139"
}, {
"type" : "WEB",
"url" : "https://github.com/solana-foundation/anchor/commit/26ef36968a62e28a1f028e7adae4806af30c747d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/solana-foundation/anchor"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2026-0146.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-13T15:33:46Z",
"nvd_published_at" : null
}
}