Skip to content
Heist/ feed
Back to feed
HighFix available

`InterfaceAccount` allows account substitution between unexpected types

Type: advisorySources: OSV

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.

Products
anchor-lang
Affected versions
Not specified
Fixed versions
1.0.0-rc.2
CVEs
Not specified
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 08:43 UTC · Revision 1

Source evidence

`InterfaceAccount` allows account substitution between unexpected types

core-osv · Original source

Published 8 May 2026, 12:00 UTC

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.

osv:RUSTSEC-2026-0146

anchor-lang

Fixed versions: 1.0.0-rc.2

Complete source record
{
  "id": "80959b0d4d2e31d8e56184df3af286908f12b6470b8b5ccddc9a6c6a570a63f5",
  "url": "https://osv.dev/vulnerability/RUSTSEC-2026-0146",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "`InterfaceAccount` allows account substitution between unexpected types",
    "summary": "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.",
    "evidence": "osv:RUSTSEC-2026-0146",
    "products": [
      {
        "name": {
          "value": "anchor-lang",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.0.0-rc.2",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "RUSTSEC-2026-0146",
      "aliases": [
        "GHSA-429q-fhh4-r6hj",
        "RUSTSEC-2026-0146"
      ],
      "metrics": [
        {
          "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": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "1.0.0-rc.1"
                },
                {
                  "fixed": "1.0.0-rc.2"
                }
              ]
            }
          ],
          "package": {
            "name": "anchor-lang",
            "purl": "pkg:cargo/anchor-lang",
            "ecosystem": "crates.io"
          },
          "database_specific": {
            "cvss": "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",
            "source": "https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0146.json",
            "categories": [],
            "informational": null
          },
          "ecosystem_specific": {
            "affects": {
              "os": [],
              "arch": [],
              "functions": []
            },
            "affected_functions": null
          }
        }
      ],
      "modified": "2026-10-12T18:00:08.341270961Z",
      "provider": "osv",
      "references": [
        "https://crates.io/crates/anchor-lang",
        "https://rustsec.org/advisories/RUSTSEC-2026-0146.html",
        "https://github.com/solana-foundation/anchor/pull/3837",
        "https://github.com/otter-sec/anchor/pull/3837",
        "https://github.com/otter-sec/anchor/pull/4139",
        "https://github.com/otter-sec/anchor/commit/26ef36968a62e28a1f028e7adae4806af30c747d"
      ],
      "provider_metadata": {
        "license": "CC-BY-4.0"
      }
    },
    "related_cves": [],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 306390,
  "published_at": "2026-05-08T12:00:00+00:00"
}