{"id":"MAL-2026-4750","summary":"Malicious code in fastapi (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (a753fd569a7bb908b7cdf82fe0228dc0e24dcc253b67993af5dd5c30b61f4411)\nThis release of fastapi 0.136.3 modifies pyproject.toml and PKG-INFO to add an undocumented dependency 'fastar\u003e=0.9.0' to the [project.optional-dependencies] standard group (pyproject.toml line 67: `\"fastar \u003e= 0.9.0\",`; PKG-INFO line 47: `Requires-Dist: fastar\u003e=0.9.0; extra == \"standard\"`). The README documents every other dependency in the [standard] group (httpx, jinja2, python-multipart, uvicorn, fastapi-cli, email-validator, pydantic-settings, pydantic-extra-types) but does not mention 'fastar'. Because the documented recommended install command is `pip install \"fastapi[standard]\"`, every user following the official documentation silently pulls the unrelated 'fastar' package onto their developer or CI machine. The name 'fastar' is a typosquat-shaped substitution against 'fastapi'/'fastapi-*' namespaces, and its insertion into the canonical install path of one of PyPI's most-installed web frameworks constitutes a dependency-confusion / namespace-abuse vector regardless of what 'fastar' currently contains. Whoever controls 'fastar' on PyPI gains code execution at install time on a very large user base.\n","modified":"2026-05-27T00:32:10.069549016Z","published":"2026-05-23T19:14:13Z","withdrawn":"2026-05-26T13:04:03Z","database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","versions":["0.136.3"],"id":"IN-MAL-2026-004380","import_time":"2026-05-26T05:52:29.184410944Z","modified_time":"2026-05-23T19:14:13Z","sha256":"a753fd569a7bb908b7cdf82fe0228dc0e24dcc253b67993af5dd5c30b61f4411"}]},"references":[{"type":"PACKAGE","url":"https://pypi.org/project/fastapi/0.136.3/"}],"affected":[{"package":{"name":"fastapi","ecosystem":"PyPI","purl":"pkg:pypi/fastapi"},"versions":["0.136.3"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/withdrawn/pypi/fastapi/MAL-2026-4750.json","cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"sha256":"ea0180f65c21d699804d214af7461e2fb07d6178283e2a2767490bca95f5a14e","tlsh":"cd22ef67d4ac9eb13b8170e9c188134189956023bd06358c77cd814e9f4eaef937da3e","path":"pyproject.toml"}],"package_integrity":[{"hashes":{"blake2b_256":"e08245359b62a067409bd929ae8a56b8ed13e5a8c8a61194b3c236920999ab83","md5":"51f97b50ece91fc6f78e673f55ed0c4e","sha256":"3d2a69bdf04b7e9f3afa292c3bc7a98816bbfafa10bc9b45f3f3700d2f761620"},"filename":"fastapi-0.136.3-py3-none-any.whl"},{"filename":"fastapi-0.136.3.tar.gz","hashes":{"sha256":"e487fae93ad408e6f47641ee4dfe389864fd7bec92e547ea8498fc13f43e83ab","blake2b_256":"812dff8d91d7b564d464629a0fd50a4489c97fcb836ac230bf3a7269232a9b1f","md5":"5e22f728ab9ea5c99a29a0137b4b8b55"}}]}}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["actran@amazon.com"],"type":"FINDER"}]}