anchor-lang
Affected
- introduced
1.0.0, fixed1.0.2(semver)
Fixed versions
1.0.2
Fix
- Fixed version
1.0.2cargo update -p anchor-lang --precise 1.0.2
Advisory
Also known as: CVE-2026-45137, GHSA-c6rc-8jpp-2fgc
Program<System> accepts arbitrary executable programs
Affected versions of anchor-lang did not properly validate accounts declared
as Program<'info, System>. The generic Program<T> validation path usedPubkey::default() as a sentinel to decide whether any executable program
should be accepted. Since the system program id is also the default pubkey,Program<'info, System> was treated like the untyped Program<'info> case and
accepted any executable program account.
Programs commonly rely on Program<'info, System> to ensure that CPI calls and
instruction builders target the real Solana system program. With the faulty
validation, an attacker could supply another executable program where the system
program was expected, causing downstream logic to make false assumptions about
payments, account creation, or other system-program CPIs.
The issue was fixed in anchor-lang 1.0.2 by separating the typedProgram<T> validation path from the untyped Program<()> path, soProgram<'info, System> now checks the provided account key against the system
program id. Users should upgrade to anchor-lang 1.0.2 or later.
High Basis: CVSS v3 score 8.2, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N
1.0.0, fixed 1.0.2 (semver)1.0.2
1.0.2cargo update -p anchor-lang --precise 1.0.2Fix 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
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).