Anchor: Program<'info, System> is not properly validated
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| solana-foundation | anchor | affected |
|
No data.
| Vendor | Product | Versions | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Solana-foundation | Anchor |
|
| Source | ID | Title |
|---|---|---|
Github GHSA |
GHSA-c6rc-8jpp-2fgc | Anchor: Program<'info, System> is not properly validated |
No CVSS v4.0
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.280% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Anchor-lang
Anchor-lang anchor |
|
| CPEs | cpe:2.3:a:anchor-lang:anchor:*:*:*:*:*:rust:*:* | |
| Vendors & Products |
Anchor-lang
Anchor-lang anchor |
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Solana-foundation
Solana-foundation anchor |
|
| Vendors & Products |
Solana-foundation
Solana-foundation anchor |
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| Description | Anchor is a framework providing several convenient developer tools for writing Solana programs. From 1.0.0 to before 1.0.2, an 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. In 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. This vulnerability is fixed in 1.0.2. | |
| Title | Anchor: Program<'info, System> is not properly validated | |
| Weaknesses | CWE-20 | |
| References |
| |
| Metrics |
cvssV3_1
|