{"id":"MAL-2026-6509","summary":"Malicious code in @merceas/anchor (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (86a51319de26245ad91c68a6a6d0713454112443e55f466711e79eb1a23a45b8)\nPackage is published as @merceas/anchor but its README, homepage (https://github.com/coral-xyz/anchor#readme), repository, and source are a verbatim copy of @coral-xyz/anchor — a typosquat/impersonation of the legitimate Solana Anchor SDK. The package.json overrides the standard `cross-fetch` dependency with an npm alias to a fork under the same scope: `\"cross-fetch\": \"npm:@merceas/cross-fetch@3.1.9\"`. Installing this package silently pulls @merceas/cross-fetch into the dependency tree, routing every HTTP call made through the SDK (including dist/cjs/utils/registry.js's `https://api.apr.dev/api/v0/program/\u003cid\u003e/latest?limit=\u003cn\u003e` call, and any fetches consumers make via the SDK's transport) through code controlled by the same actor that published this typosquat. The cross-fetch substitution is the attack mechanism: the malicious payload is in the transitive package the installer is forced to pull, not in this tarball.\n","modified":"2026-06-26T06:46:30.021481459Z","published":"2026-06-26T05:51:43Z","database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-007599","import_time":"2026-06-26T06:28:53.15060173Z","modified_time":"2026-06-26T05:51:46Z","sha256":"86a51319de26245ad91c68a6a6d0713454112443e55f466711e79eb1a23a45b8","source":"amazon-inspector","versions":["0.32.1"]},{"modified_time":"2026-06-26T05:51:43Z","sha256":"a134a4286f35463d5ea5dec990bba508dfae1014c9ca7c6b8a674b5204150465","source":"amazon-inspector","versions":["0.32.3"],"id":"IN-MAL-2026-007597","import_time":"2026-06-26T06:28:53.06219528Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/@merceas/anchor/v/0.32.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@merceas/anchor/v/0.32.3"}],"affected":[{"package":{"name":"@merceas/anchor","ecosystem":"npm","purl":"pkg:npm/%40merceas%2Fanchor"},"versions":["0.32.1","0.32.3"],"database_specific":{"indicators":{"package_integrity":[{"filename":"anchor-0.32.1.tgz","hashes":{"sha1":"33fa35cb493a13d84adef8f571467222256094bb","sha512_sri":"sha512-7jNYb9WmKOTBqhgD51Hq0NZvHXOzZx5d1LhlIJzJRQW+pnnNxUIUHTXvAKd0IGhNCagkDN50LEIE01PpryN5hQ=="}}],"evidence_files":[{"tlsh":"f951df21cd2cdc630ac016d8e83a0a62a13999534d94fc4d73a69b3d0f4d29f327eb2d","path":"package.json","sha256":"18bfa1ec76af587579ddf1358d9ef82c11d9be23c2b8ade610d4265306f87336"},{"sha256":"f7c5df166b0a8d334b050366fd5f7c741571ccab265a7d1f66f39a7adc0fde30","tlsh":"2a71ba243af762e14116309dc63f8a05e66cde23221cd4257e4c81addf75a24b67ef91","path":"dist/cjs/utils/registry.js"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@merceas/anchor/MAL-2026-6509.json","cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}]}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}