{"id":"CVE-2026-45137","sourceIdentifier":"security-advisories@github.com","published":"2026-05-27T21:16:18.670","lastModified":"2026-10-26T12:10:00.130","vulnStatus":"Analyzed","cveTags":[],"descriptions":[{"lang":"en","value":"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."},{"lang":"es","value":"Anchor es un framework que proporciona varias herramientas convenientes para desarrolladores para escribir programas Solana. Desde 1.0.0 hasta antes de 1.0.2, un error lógico hace que los programas anchor acepten cualquier ID de programa cuando se requiere el ID del programa del sistema, causando suposiciones falsas que resultan en potencial CPI arbitrario en programas que invocan instrucciones del programa del sistema. En la implementación TryFrom<&’a AccountInfo<’a>> para Program<’a, T>, el ID de T se compara con Pubkey::default() para verificar si anchor debería permitir cualquier cuenta ejecutable, o una cuenta específica, porque cuando no se suministra T, T por defecto es (), que implementa Id::id() devolviendo Pubkey::default(). Esto resulta en que T = () y T = System (que tiene Pubkey::default() como ID) tengan el mismo comportamiento, ambos permiten cualquier cuenta ejecutable. Los programas construidos con anchor asumen que el tiempo de ejecución de anchor verifica que los programas pasados de tipo Program<’a, System> son de hecho el programa del sistema. Esta suposición falsa puede llevar a CPI arbitrario o a la elusión de pagos cuando los programas intentan realizar llamadas CPI al programa del sistema utilizando el programa del sistema pasado, debido al hecho de que el atacante puede pasar cualquier programa en lugar del programa del sistema. Esta vulnerabilidad se corrige en 1.0.2."}],"affected":[{"source":"security-advisories@github.com","affectedData":[{"vendor":"solana-foundation","product":"anchor","versions":[{"version":">= 1.0.0, < 1.0.2","status":"affected"}]}]}],"metrics":{"cvssMetricV31":[{"source":"security-advisories@github.com","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N","baseScore":8.2,"baseSeverity":"HIGH","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"LOW","integrityImpact":"HIGH","availabilityImpact":"NONE"},"exploitabilityScore":3.9,"impactScore":4.2}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-05-28T13:04:41.218046Z","id":"CVE-2026-45137","options":[{"exploitation":"poc"},{"automatable":"yes"},{"technicalImpact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"weaknesses":[{"source":"security-advisories@github.com","type":"Secondary","description":[{"lang":"en","value":"CWE-20"}]}],"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:anchor-lang:anchor:*:*:*:*:*:rust:*:*","versionStartIncluding":"1.0.0","versionEndExcluding":"1.0.2","matchCriteriaId":"C7C8FFC0-EF8D-4C5A-AE99-8BCE4B9CB291"}]}]}],"references":[{"url":"https://github.com/otter-sec/anchor/security/advisories/GHSA-c6rc-8jpp-2fgc","source":"security-advisories@github.com","tags":["Vendor Advisory","Exploit"]},{"url":"https://github.com/otter-sec/anchor/security/advisories/GHSA-c6rc-8jpp-2fgc","source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","tags":["Vendor Advisory","Exploit"]}]}