{"id":"MAL-2026-3153","summary":"Malicious code in apple-infra-final-escape (npm)","details":"Malicious npm package published by threat actor \"raya4321\" as part of a coordinated typosquatting campaign impersonating Apple internal infrastructure services (authentication, PKI, telemetry, CloudKit, and cloud infrastructure). All packages in this campaign execute credential-theft payloads during npm installation via preinstall or postinstall lifecycle hooks.\n\nTrigger: preinstall. Functions as a second-stage payload loader: executes /tmp/final_sweep.sh if present, enabling execution of payloads dropped by coordinated packages in the same campaign. The package also bundles pwn.sh, which hunts for npm/GitHub authentication tokens (NPM_TOKEN, NODE_AUTH_TOKEN, GITHUB_TOKEN, NPM_AUTH_TOKEN) in the environment and ~/.npmrc, then uses any found token to publish a trojanized version of apple-app-store-server-library to the npm registry (supply chain attack), and exfiltrates results to https://webhook.site/85f78e76-dc73-4cb5-a65c-27f2c10db591.\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (5f85575cbff2874c8b46829da379d736724e41f98a200b345e0c341e6f9d1a36)\nThe package apple-infra-final-escape was found to contain malicious code.\n\n## Source: ghsa-malware (4a9de48de2e8667ed290e573c456858dd931a8e7c47610fa5e6f6a3d989bf7ae)\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.\n","aliases":["GHSA-whv7-rqc3-rvhc"],"modified":"2026-05-15T11:22:44.579189Z","published":"2026-04-29T08:00:00Z","database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","modified_time":"2026-04-30T21:59:18Z","import_time":"2026-04-30T22:23:14.098226115Z","sha256":"5f85575cbff2874c8b46829da379d736724e41f98a200b345e0c341e6f9d1a36","versions":["1.7.0"]},{"modified_time":"2026-05-15T10:41:00Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"import_time":"2026-05-15T11:03:58.983364138Z","sha256":"4a9de48de2e8667ed290e573c456858dd931a8e7c47610fa5e6f6a3d989bf7ae","id":"GHSA-whv7-rqc3-rvhc","source":"ghsa-malware"}]},"references":[{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-whv7-rqc3-rvhc"}],"affected":[{"package":{"name":"apple-infra-final-escape","ecosystem":"npm","purl":"pkg:npm/apple-infra-final-escape"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.7.0"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/apple-infra-final-escape/MAL-2026-3153.json","cwes":[{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"},{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"}]}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["actran@amazon.com"],"type":"FINDER"},{"name":"SafeDep","contact":["https://safedep.io"],"type":"FINDER"}]}