{"id":"MAL-2026-16128","title":"Malicious code in pymem-win (PyPI)","summary":"Malicious code in pymem-win (PyPI)","severity":"critical","exploited":true,"vendor":"pymem-win","product":"pymem-win","ecosystem":"pip","affected":["pymem-win"],"published":"2026-09-11","updated":"2026-09-11","sourceUpdated":"2026-09-11T23:30:06.364603204Z","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/MAL-2026-16128","references":[{"url":"https://bad-packages.kam193.eu/pypi/package/pymem-win"},{"url":"https://pypi.org/project/Pymem-win/1.14.6/"}],"tags":["osv","pip","malware"],"ingestedAt":"2026-09-12T03:13:01.742Z","slug":"MAL-2026-16128","body":"## Overview\n\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (4c611131ac135f4608698ce56eebd7dc89623b591510a050f2059369c9d51bbf)\nPymem-win is a near-verbatim copy of the legitimate upstream Pymem package (reusing its description, repository URL github.com/srounet/Pymem, and author identity Fabien Reboia <srounet@gmail.com>) republished under a confusable name. The top-level pymem/__init__.py contains a one-line loader that reverses a bytes literal, base64-decodes it, zlib-decompresses it, and passes the result to exec(). This runs unconditionally on `import pymem`, handing full in-process code execution to a payload deliberately hidden behind three stacked transforms. The multi-layer obfuscation around an exec target has no legitimate purpose in a library import path; combined with the typosquat cover story that reuses the upstream author's identity, the package's function on install/import is to run attacker-chosen code inside any process that imports it.\n\n## Source: kam193 (82eb1f11c9b56a2f2c3e97530db43ef94784a2c75697223828403927b0528477)\nDuring import, the obfuscated code downloads and executes an executable. The remote executable did not exist during analysis, but the repository used to host it overlaps with previous campaign 2026-07-yt-api-dlp\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-09-pymem-win\n\n\nReasons (based on the campaign):\n\n\n - obfuscation\n\n\n - Downloads and executes a remote executable.\n\n\n - clones-real-package\n\n\n## Affected packages\n\n- `pymem-win`\n\n## Remediation\n\nRefer to the advisory for the patched release.","depth":"abyssal","depthScore":70,"depthScoreParts":{"impact":52.3,"likelihood":0,"exploitation":18,"ransomware":0},"changes":[]}