CVE-2026-45137
HighSummary
W frameworku Anchor, od wersji 1.0.0 do przed 1.0.2, występuje błąd logiczny, który pozwala programom na akceptowanie dowolnego identyfikatora programu zamiast wymaganego identyfikatora systemowego. To prowadzi do fałszywych założeń, co może skutkować potencjalnym arbitralnym wywołaniem CPI w programach, które wywołują instrukcje programu systemowego.
Risk Assessment
Organizacje mogą być narażone na nieautoryzowane wywołania programów, co może prowadzić do obejścia płatności lub nieautoryzowanego dostępu do funkcji systemowych. To stwarza poważne zagrożenie dla integralności i bezpieczeństwa aplikacji opartych na Solanie.
Recommendation
Zaleca się aktualizację frameworka Anchor do wersji 1.0.2, aby usunąć tę podatność. Dodatkowo, należy przeprowadzić audyt kodu aplikacji, aby upewnić się, że nie wykorzystuje ona podatnych wersji.
Original NVD description (English source)
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.

