# GHSA-429q-fhh4-r6hj: `InterfaceAccount` allows account substitution between unexpected types

> Attackers can bypass account-type validation in Anchor programs, leading to incorrect authorization and state manipulation.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 May 2026
- **Also known as:** RUSTSEC-2026-0146

## What is GHSA-429q-fhh4-r6hj?

GHSA-429q-fhh4-r6hj is a missing authorization vulnerability in anchor-lang, published on 8 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

## Which versions are affected by GHSA-429q-fhh4-r6hj?

3 open source packages ship an affected version, including anchor-lang.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `anchor-lang` | crates.io | From 1.0.0-rc.1 | 1.0.0-rc.2 |
| `anchor-lang` | crates.io | From 1.0.0-rc.1 | 1.0.0-rc.2 |
| `anchor-lang` | crates.io | From 1.0.0-rc.1 | 1.0.0-rc.2 |

## How do I fix GHSA-429q-fhh4-r6hj?

Upgrade anchor-lang to 1.0.0-rc.2 or later.

## Is GHSA-429q-fhh4-r6hj being exploited?

There is no known exploitation of GHSA-429q-fhh4-r6hj in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-429q-fhh4-r6hj and fix it if it is affected.

What it is: GHSA-429q-fhh4-r6hj is a missing authorization vulnerability in anchor-lang, published on 8 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-429q-fhh4-r6hj in the wild and no public exploit code.

Affected packages and fixed versions:
- anchor-lang (crates.io): affected from 1.0.0-rc.1; fixed in 1.0.0-rc.2
- anchor-lang (crates.io): affected from 1.0.0-rc.1; fixed in 1.0.0-rc.2
- anchor-lang (crates.io): affected from 1.0.0-rc.1; fixed in 1.0.0-rc.2

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-429q-fhh4-r6hj/ (Markdown: https://insights.sbomify.com/GHSA-429q-fhh4-r6hj/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-429q-fhh4-r6hj

---
From sbomify Insights: https://insights.sbomify.com/GHSA-429q-fhh4-r6hj/
Summaries are generated and may contain mistakes; the official description above is the record.
