{"answers":{"affected":"3 open source packages ship an affected version, including anchor-lang. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-45137 exists.","fix":"Upgrade anchor-lang to 1.0.2 or later.","what":"CVE-2026-45137 is a high-severity missing authorization vulnerability in solana-foundation anchor, published on 27 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-45137 and fix it if it is affected.\n\nWhat it is: CVE-2026-45137 is a high-severity missing authorization vulnerability in solana-foundation anchor, published on 27 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-45137 exists.\n\nAffected packages and fixed versions:\n- anchor-lang (crates.io): affected from 1.0.0; fixed in 1.0.2\n- anchor-lang (crates.io): affected from 1.0.0; fixed in 1.0.2\n- anchor-lang (crates.io): affected from 1.0.0; fixed in 1.0.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-45137/ (Markdown: https://insights.sbomify.com/CVE-2026-45137/index.md)","id":"CVE-2026-45137","markdown":"https://insights.sbomify.com/CVE-2026-45137/index.md","name":"CVE-2026-45137","record":{"aliases":["GHSA-c6rc-8jpp-2fgc","RUSTSEC-2026-0144"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Solana Anchor framework","requires_auth":"none","summary":"Attackers can bypass system program validation in Solana Anchor programs, enabling arbitrary cross-program invocations and payment bypasses.","user_interaction":"not_required","vuln_class":"missing_authorization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"anchor","vendor":"anchor-lang"}],"cvss":{"score":8.2,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"}],"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\u003c\u0026'a AccountInfo\u003c'a\u003e\u003e implementation for Program\u003c'a, T\u003e, 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\u003c'a, System\u003e 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.","ecosystems":["crates.io"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Anchor: Program\u003c'info, System\u003e is not properly validated","id":"CVE-2026-45137","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"missing_authorization","year":"2026"},"n_packages":3,"n_references":1,"next":{"headline":"CI4MS: Stored XSS in Blog Content via Broken `html_purify` Validation Rule","id":"CVE-2026-45138"},"packages":[{"ecosystem":"crates.io","fixed":["1.0.2"],"introduced":["1.0.0"],"last_affected":[],"package":"anchor-lang","purl":null,"source":"GHSA-c6rc-8jpp-2fgc"},{"ecosystem":"crates.io","fixed":["1.0.2"],"introduced":["1.0.0"],"last_affected":[],"package":"anchor-lang","purl":"pkg:cargo/anchor-lang","source":"GHSA-c6rc-8jpp-2fgc"},{"ecosystem":"crates.io","fixed":["1.0.2"],"introduced":["1.0.0"],"last_affected":[],"package":"anchor-lang","purl":"pkg:cargo/anchor-lang","source":"RUSTSEC-2026-0144"}],"prev":{"headline":"claude-code-cache-fix: Local code execution via Python triple-quote injection in tools/quota-statusline.sh","id":"CVE-2026-45136"},"products":["anchor"],"published":"2026-05-27","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-05-28","vendors":["solana-foundation"]},"summary":"Attackers can bypass system program validation in Solana Anchor programs, enabling arbitrary cross-program invocations and payment bypasses.","url":"https://insights.sbomify.com/CVE-2026-45137/"}