{"schema_version":"1.9.2","id":"MAL-2026-18490","published":"2026-11-02T22:11:26Z","modified":"2026-11-12T04:30:04.152916010Z","summary":"Malicious code in pyprig (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (83ccb335aa01c8a31acb208aa2f1c2654ab010f9f3cc29fd2f1e6f60a44113f8)\npyprig impersonates pydantic: the package name, description ('Data validation using Python type hints'), and README are near-verbatim clones of pydantic, and pyproject.toml lists pydantic's real maintainers (Samuel Colvin, Eric Jolibois, Hasan Ramezani, David Hewitt, et al.) as authors. The top-level pyprig/__init__.py unconditionally calls get_help() from pyprig/help.py on every import. get_help() downloads https://github.com/PyPrig/pyprig-help/archive/refs/heads/main.zip from the mutable main branch with no commit pin and no hash or signature verification, then extracts the archive into the installed package tree at /pyprig/help/ via archive.extractall followed by shutil.copytree into HELP_DIR = PACKAGE_DIR / 'help'. Because the files land inside the Python package directory, whoever controls the PyPrig/pyprig-help repository can replace them at any time to stage Python files that are then importable from within the package, giving arbitrary code execution on any machine that imports pyprig after the swap.\n\n## Source: kam193 (11f4beddcb42e2348d31d2ef0605d72198a28e796467c8afbac5c5c30d870315)\nClone of a legitimate Pydantic package with the added downloading of a remote code. The remote code is delivered from the GitHub repository and unpacked as a new module and then called during initialization of any models (runner injected into cloned Pydantic code). During analysis, the remote code was just a placeholder.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-11-pyprig\n\n\nReasons (based on the campaign):\n\n\n - Downloads and executes a remote malicious script.\n\n\n - clones-real-package\n","affected":[{"package":{"name":"pyprig","ecosystem":"PyPI","purl":"pkg:pypi/pyprig"},"versions":["1.2.0","1.2.1","1.2.2"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"pyprig/help.py","sha256":"faf8ee4f5fa421e08ccc4a38349cdc4c938b04887fba173aeca33497db31ee3c","tlsh":"9a411f534c93319091b8e50c5ed59497f323f1c32ebb58a336bc5f642fb0ad1a2e9289"},{"path":"pyproject.toml","sha256":"8cecd88a3bf9b539fbd0153d872772a0ec6b6615ade8332513f318cb03c49889","tlsh":"d202b6b394fb11b72a8b5513d1ac4e4257246073ee82b5a8bdec85885fcceadc1b1138"}],"package_integrity":[{"filename":"pyprig-1.2.1-py3-none-any.whl","hashes":{"blake2b_256":"46f7103e59c83d57032c7de914561a40c79e7fb9d03d4b3caa5f0f6bdcd91744","md5":"d8546bf9f83687c9d153165cbeb5f072","sha256":"700038278fe5e82f7ba5e2833ea578c6b7441f7b9368f0fbef5a6491b835a81f"}},{"filename":"pyprig-1.2.1.tar.gz","hashes":{"blake2b_256":"f35f97c643ac0a5fdf85b73ff94ab380a34663ad7f65d8df37ed79d8517cb892","md5":"e427ad9010e761f2cb90809b257682d3","sha256":"74a0ff110c95245ad491eba59bc417f7fbf8ad0cf234d2be5124a4970de1b438"}}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/pyprig/MAL-2026-18490.json"}}],"references":[{"type":"WEB","url":"https://github.com/PyPrig/pyprig-validation-toolkit"},{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/pyprig"},{"type":"PACKAGE","url":"https://pypi.org/project/pyprig/1.2.1/"}],"database_specific":{"malicious-packages-origins":[{"id":"pypi/2026-11-pyprig/pyprig","import_time":"2026-11-02T23:10:57.383268222Z","modified_time":"2026-11-02T22:11:26.957755Z","sha256":"11f4beddcb42e2348d31d2ef0605d72198a28e796467c8afbac5c5c30d870315","source":"kam193","versions":["1.2.0","1.2.1","1.2.2"]},{"id":"IN-MAL-2026-022640","import_time":"2026-11-12T04:13:27.083157068Z","modified_time":"2026-11-12T03:39:49Z","sha256":"83ccb335aa01c8a31acb208aa2f1c2654ab010f9f3cc29fd2f1e6f60a44113f8","source":"amazon-inspector","versions":["1.2.1"]}]},"credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"Kamil MaƄkowski (kam193)","contact":["https://github.com/kam193","https://bad-packages.kam193.eu/"],"type":"REPORTER"}]}