{"id":"MAL-2026-10753","summary":"Malicious code in a3s-code (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (6062cbfbdc0c31c48564e4ec850d2ce71996d6cf12373c775aed5560c88e5434)\nOn first `import a3s_code`, top-level `__init__.py` invokes `_bootstrap.ensure_native_loaded()`, which performs an HTTP GET to `https://github.com/A3S-Lab/Code/releases/download/...`, writes `_native.\u003cabi\u003e.so|.pyd|.dylib` under `~/.cache/a3s-code/\u003cversion\u003e/`, and loads it via `importlib.machinery.ExtensionFileLoader` — executing native code fetched at import time and bypassing pip build isolation. Package metadata (README.md, PKG-INFO, pyproject.toml `[project.urls]` Homepage) consistently declares the project as `github.com/AI45Lab/Code`, but the hard-coded fetch base URL in `_bootstrap.py` is `github.com/A3S-Lab/Code` — a visually similar but distinct GitHub organization. Hash verification is same-origin (manifest is served from the same base URL) and is silently skipped when the manifest fetch fails, providing no integrity guarantee against the fetched org. The bytes an installer actually executes come from an organization the documentation does not point to, so review of the documented repo does not correspond to what runs on the installer's machine.\n","modified":"2026-07-16T19:20:02.479773680Z","published":"2026-07-16T18:42:27Z","database_specific":{"malicious-packages-origins":[{"modified_time":"2026-07-16T18:42:27Z","sha256":"18b5167a0f3cc336fec5ca51c7d0ddb0a35d45279d0de87074738e08c2977e54","source":"amazon-inspector","versions":["5.2.8"],"id":"IN-MAL-2026-010753","import_time":"2026-07-16T18:54:02.835487709Z"},{"source":"amazon-inspector","versions":["5.3.3"],"id":"IN-MAL-2026-010768","import_time":"2026-07-16T18:54:03.703093434Z","modified_time":"2026-07-16T18:44:42Z","sha256":"6062cbfbdc0c31c48564e4ec850d2ce71996d6cf12373c775aed5560c88e5434"}]},"references":[{"type":"PACKAGE","url":"https://pypi.org/project/a3s-code/5.2.8/"},{"type":"PACKAGE","url":"https://pypi.org/project/a3s-code/5.3.3/"}],"affected":[{"package":{"name":"a3s-code","ecosystem":"PyPI","purl":"pkg:pypi/a3s-code"},"versions":["5.2.8","5.3.3"],"database_specific":{"indicators":{"evidence_files":[{"tlsh":"20f1a64acb48d6b3d322859ad89582d4e33ae40797156438bedd837c2f95079c3b20fd","path":"src/a3s_code/_bootstrap.py","sha256":"6633a77a3f15ab55eaeb344ff918f69f73e12aca521cb87b7d7e88a533cd905d"}],"package_integrity":[{"hashes":{"md5":"ba24301b4082e03e1011a84b49216191","sha256":"dc5832d446786ce249c4899ed82cb9e3fc47242d739bf1b5792f07ffc33bfd99","blake2b_256":"b25720d8c4d22fa3da80775170a8e3bef9553ba5ed04c8a49509fbc0395c5eb0"},"filename":"a3s_code-5.2.8-py3-none-any.whl"},{"filename":"a3s_code-5.2.8.tar.gz","hashes":{"sha256":"f4efc75ce99b71418d6596bedf25e30b1e681374121272ac9e37694bc794bf50","blake2b_256":"5830afca4bd8583b8251ab32dfff7b9825d4d00f118333ed079c45c643c892cf","md5":"73dd50aa21e3f74752415e04219fec40"}}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/a3s-code/MAL-2026-10753.json","cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}]}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}