anchor-lang
⚓ Solana Program Framework
Activity
- Latest release
- 16m ago
- Total releases
- 67
- Cadence
- ~20 days
- Last 12 months
- 17
Reach
- Downloads
- 7.0M
- Stars
- 5.1k
Details
- License
- Apache-2.0
- First release
- Jan 15, 2021
| Version | Released | |
|---|---|---|
0.32.2
patch
|
0.32.2
patch
Dependencies (35)
+ 27 more
Changelog
Compare changes
|
|
0.31.2
patch
|
0.31.2
patch
Dependencies (16)
+ 8 more
Changelog
Compare changes
|
|
1.2.0
minor
|
1.2.0
minor
Dependencies (38)
+ 30 more
Changelog
Compare changes
|
|
2.0.0-rc.1
pre
|
2.0.0-rc.1
pre
Dependencies (16)
+ 8 more
Changelog
Compare changes
|
|
1.0.3
unknown
|
1.0.3
unknown
Dependencies (37)
+ 29 more
Changelog
Compare changes
|
|
1.1.2
unknown
|
1.1.2
unknown
Dependencies (38)
+ 30 more
Changelog
Compare changes
|
|
1.1.1
unknown
|
1.1.1
unknown
Dependencies (38)
+ 30 more
Changelog
Compare changes
|
|
1.0.2
unknown
|
1.0.2
unknown
Dependencies (37)
+ 29 more
Changelog
Compare changes
|
|
1.0.1
unknown
1 CVE
CVE-2026-45137
GHSA-c6rc-8jpp-2fgc
RUSTSEC-2026-0144
May 13, 2026
Anchor: Program<'info, System> is not properly validated
8.2
/ 10
High
Network
Low
None
None
Unchanged
Low
High
None
SummaryAn logic error causes anchor programs to accept any program id when requiring the system program id, causing false assumptions resulting in potential arbitrary cpi in programs that invoke system program instructions. DetailsIn the TryFrom<&'a AccountInfo<'a>> implementation for Program<'a, T>, the id of T is compared with Pubkey::default() to check whether anchor should allow any executable account, or a specific account, because when no T is supplied, T defaults to (), which implements Id::id() by returning Pubkey::default(). This results in T = () and T = System (which has Pubkey::default() as the id) having the same behavior, both allow any executable account. Programs built with anchor assume that the anchor runtime verifies passed in programs of type Program<'a, System> are in fact the system program. This false assumption can lead to arbitrary CPI or payment bypassing when programs try making CPI calls to the system program using the passed in system program due to the fact that the attacker can pass in any program instead of the system program. https://github.com/solana-foundation/anchor/blob/5ff3f96eeda91cc54b7fa525631eb8c1394fda04/lang/src/accounts/program.rs#L148-L163 PoCBuild and deploy the following anchor program:
Run the following javascript code in the project after installing @coral-xyz/anchor and @solana/web3.js
Inspect the solana validator logs and javascript output, you'll see the program did not transfer any lamports. If you uncomment the systemProgram account override in the javascript code and rerun it, you'll see the victim program behaves as expected and lamports are actually transferred. ImpactThis is an account validation bypass, impacting on-chain programs that rely on the system program. It allows for potential CPI and payment bypasses, amongst other issues such as accounts being created through CPI that should be owned by system program now being owned by an attacker controlled program. Fixed in
1.0.2
References
Updated Jun 09, 2026 · Source: OSV.dev |
1.0.1
unknown
Dependencies (37)
+ 29 more
Changelog
Compare changes
|
|
1.0.0
unknown
1 CVE
CVE-2026-45137
GHSA-c6rc-8jpp-2fgc
RUSTSEC-2026-0144
May 13, 2026
Anchor: Program<'info, System> is not properly validated
8.2
/ 10
High
Network
Low
None
None
Unchanged
Low
High
None
SummaryAn logic error causes anchor programs to accept any program id when requiring the system program id, causing false assumptions resulting in potential arbitrary cpi in programs that invoke system program instructions. DetailsIn the TryFrom<&'a AccountInfo<'a>> implementation for Program<'a, T>, the id of T is compared with Pubkey::default() to check whether anchor should allow any executable account, or a specific account, because when no T is supplied, T defaults to (), which implements Id::id() by returning Pubkey::default(). This results in T = () and T = System (which has Pubkey::default() as the id) having the same behavior, both allow any executable account. Programs built with anchor assume that the anchor runtime verifies passed in programs of type Program<'a, System> are in fact the system program. This false assumption can lead to arbitrary CPI or payment bypassing when programs try making CPI calls to the system program using the passed in system program due to the fact that the attacker can pass in any program instead of the system program. https://github.com/solana-foundation/anchor/blob/5ff3f96eeda91cc54b7fa525631eb8c1394fda04/lang/src/accounts/program.rs#L148-L163 PoCBuild and deploy the following anchor program:
Run the following javascript code in the project after installing @coral-xyz/anchor and @solana/web3.js
Inspect the solana validator logs and javascript output, you'll see the program did not transfer any lamports. If you uncomment the systemProgram account override in the javascript code and rerun it, you'll see the victim program behaves as expected and lamports are actually transferred. ImpactThis is an account validation bypass, impacting on-chain programs that rely on the system program. It allows for potential CPI and payment bypasses, amongst other issues such as accounts being created through CPI that should be owned by system program now being owned by an attacker controlled program. Fixed in
1.0.2
References
Updated Jun 09, 2026 · Source: OSV.dev |
1.0.0
unknown
Dependencies (37)
+ 29 more
Changelog
Compare changes
|
|
1.0.0-rc.5
unknown
|
1.0.0-rc.5
unknown
Dependencies (37)
+ 29 more
Changelog
Compare changes
|
|
1.0.0-rc.4
unknown
|
1.0.0-rc.4
unknown
Dependencies (37)
+ 29 more
Changelog
Compare changes
|
|
1.0.0-rc.3
unknown
|
1.0.0-rc.3
unknown
Dependencies (37)
+ 29 more
Changelog
Compare changes
|
|
1.0.0-rc.2
unknown
|
1.0.0-rc.2
unknown
Dependencies (37)
+ 29 more
Changelog
Compare changes
|
|
1.0.0-rc.1
unknown
1 CVE
GHSA-429q-fhh4-r6hj
RUSTSEC-2026-0146
May 13, 2026
Anchor: `InterfaceAccount` allows account substitution between unexpected types
High
Network
Low
None
None
ImpactAny uses of The bug was originally reported and fixed in https://github.com/solana-foundation/anchor/pull/4139, see that PR for more details. Patcheshttps://github.com/solana-foundation/anchor/pull/4139 patched the issue and was released in ReferencesBug landed in: https://github.com/solana-foundation/anchor/pull/3837 Bug fixed in: https://github.com/solana-foundation/anchor/pull/4139 Affected versions
1.0.0-rc.1
Fixed in
1.0.0-rc.2
References
Updated May 19, 2026 · Source: OSV.dev |
1.0.0-rc.1
unknown
Dependencies (37)
+ 29 more
Changelog
Compare changes
|
|
0.32.1
unknown
|
0.32.1
unknown
Dependencies (35)
+ 27 more
Changelog
Compare changes
|
|
0.32.0
unknown
|
0.32.0
unknown
Dependencies (35)
+ 27 more
Changelog
Compare changes
|
|
0.31.1
unknown
|
0.31.1
unknown
Dependencies (16)
+ 8 more
Changelog
Compare changes
|
|
0.31.0
unknown
|
0.31.0
unknown
Dependencies (16)
+ 8 more
Changelog
Compare changes
|
|
0.30.1
unknown
|
0.30.1
unknown
Dependencies (18)
+ 10 more
Changelog
Compare changes
|
|
0.30.0
unknown
|
0.30.0
unknown
Dependencies (18)
+ 10 more
Changelog
Compare changes
|
|
0.29.0
unknown
|
0.29.0
unknown
Dependencies (18)
+ 10 more
Changelog
Compare changes
|
|
0.28.0
unknown
|
0.28.0
unknown
Dependencies (16)
+ 8 more
Changelog
Compare changes
|
|
0.27.0
unknown
|
0.27.0
unknown
Dependencies (15)
+ 7 more
Changelog
Compare changes
|
|
0.26.0
unknown
|
0.26.0
unknown
Dependencies (16)
+ 8 more
Changelog
Compare changes
|
|
0.25.0
unknown
|
0.25.0
unknown
Dependencies (16)
+ 8 more
Changelog
Compare changes
|
|
0.24.2
unknown
|
0.24.2
unknown
Dependencies (16)
+ 8 more
Changelog
Compare changes
|
|
0.24.1
unknown
yanked
|
0.24.1
unknown
yanked
Dependencies (16)
+ 8 more
Changelog
Compare changes
|
|
0.24.0
unknown
yanked
|
0.24.0
unknown
yanked
Dependencies (16)
+ 8 more
Changelog
Compare changes
|
|
0.23.0
unknown
yanked
|
0.23.0
unknown
yanked
Dependencies (16)
+ 8 more
Changelog
Compare changes
|
|
0.22.1
unknown
yanked
|
0.22.1
unknown
yanked
Dependencies (16)
+ 8 more
Changelog
Compare changes
|
|
0.22.0
unknown
yanked
|
0.22.0
unknown
yanked
Dependencies (16)
+ 8 more
Changelog
Compare changes
|
|
0.21.0
unknown
yanked
|
0.21.0
unknown
yanked
Dependencies (16)
+ 8 more
Changelog
Compare changes
|
|
0.20.1
unknown
yanked
|
0.20.1
unknown
yanked
Dependencies (16)
+ 8 more
Changelog
Compare changes
|
|
0.20.0
unknown
yanked
|
0.20.0
unknown
yanked
Dependencies (16)
+ 8 more
Changelog
Compare changes
|
|
0.19.0
unknown
yanked
|
0.19.0
unknown
yanked
Dependencies (15)
+ 7 more
Changelog
Compare changes
|
|
0.18.2
unknown
yanked
|
0.18.2
unknown
yanked
Dependencies (13)
+ 5 more
Changelog
Compare changes
|
|
0.18.0
unknown
yanked
|
0.18.0
unknown
yanked
Dependencies (13)
+ 5 more
Changelog
Compare changes
|
|
0.17.0
unknown
yanked
|
0.17.0
unknown
yanked
Dependencies (13)
+ 5 more
Changelog
Compare changes
|
|
0.16.2
unknown
yanked
|
0.16.2
unknown
yanked
Dependencies (13)
+ 5 more
Changelog
Compare changes
|
|
0.16.1
unknown
yanked
|
0.16.1
unknown
yanked
Dependencies (13)
+ 5 more
Changelog
Compare changes
|
|
0.16.0
unknown
yanked
|
0.16.0
unknown
yanked
Dependencies (13)
+ 5 more
Changelog
Compare changes
|
|
0.15.0
unknown
yanked
|
0.15.0
unknown
yanked
Dependencies (13)
+ 5 more
Changelog
Compare changes
|
|
0.14.0
unknown
yanked
|
0.14.0
unknown
yanked
Dependencies (13)
+ 5 more
Changelog
Compare changes
|
|
0.13.2
unknown
yanked
|
0.13.2
unknown
yanked
Dependencies (13)
+ 5 more
Changelog
Compare changes
|
|
0.13.1
unknown
yanked
|
0.13.1
unknown
yanked
Dependencies (13)
+ 5 more
Changelog
Compare changes
|
|
0.13.0
unknown
yanked
|
0.13.0
unknown
yanked
Dependencies (13)
+ 5 more
Changelog
Compare changes
|
|
0.12.0
unknown
yanked
|
0.12.0
unknown
yanked
Dependencies (14)
+ 6 more
Changelog
Compare changes
|
|
0.11.1
unknown
yanked
|
0.11.1
unknown
yanked
Dependencies (13)
+ 5 more
Changelog
Compare changes
|
|
0.11.0
unknown
yanked
|
0.11.0
unknown
yanked
Dependencies (13)
+ 5 more
Changelog
Compare changes
|