Skip to content
Heist/ feed
Back to feed
Unrated

Malicious code in pyyi (PyPI)

Type: advisorySources: OSV

The verified PyPI wheel declares a console command named python2 (pyyi.cli:main). For commands other than the local REPL, help, version, unlock, or uninstall paths, it obtains configuration and calls run_payload(). Registration sends the hostname and OS to a configured space-z.ai server and stores the returned apiKey in ~/.python2/config.json. The REPL presents a normal Python banner but silently sends eligible single-token inputs to /api/cli/unlock as the password field, subject to filtering and attempt limits. run_payload() fetches code from /api/cli/payload, base64-decodes and gzip-decompresses it, then executes it in memory using exec(compile(src, '', 'exec'), g) at pyyi/cli.py:640 and calls its main function. Loader failures are disguised as Python's can't open file error. The malicious assessment is based on the combination of interpreter impersonation, concealed input transmission, remote code execution, and deliberate failure concealment, rather than encoding or exec alone. Static review and isolated, network-disabled mock tests confirmed the input-to-request and response-to-execution data flows using synthetic canaries and payloads. No live endpoint was contacted, and the actual server-supplied payload and its subsequent behavior remain unknown. Wheel SHA-256: 003828175a747a9a3de8029e6a028ad2c3739abf1dad7b468b25636e391e91f4. --- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (9cf00d6eaf64906d3dc7feaf25f521d20d150832a04df89ecde5c66

Products
pyyi
Affected versions
2.4, 2.4.1, 2.4.2, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.5
Fixed versions
Not specified
CVEs
Not specified
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 13:14 UTC · Revision 1

Source evidence

Malicious code in pyyi (PyPI)

core-osv · Original source

Published 16 Oct 2026, 15:57 UTC

The verified PyPI wheel declares a console command named python2 (pyyi.cli:main). For commands other than the local REPL, help, version, unlock, or uninstall paths, it obtains configuration and calls run_payload(). Registration sends the hostname and OS to a configured space-z.ai server and stores the returned apiKey in ~/.python2/config.json. The REPL presents a normal Python banner but silently sends eligible single-token inputs to /api/cli/unlock as the password field, subject to filtering and attempt limits. run_payload() fetches code from /api/cli/payload, base64-decodes and gzip-decompresses it, then executes it in memory using exec(compile(src, '', 'exec'), g) at pyyi/cli.py:640 and calls its main function. Loader failures are disguised as Python's can't open file error. The malicious assessment is based on the combination of interpreter impersonation, concealed input transmission, remote code execution, and deliberate failure concealment, rather than encoding or exec alone. Static review and isolated, network-disabled mock tests confirmed the input-to-request and response-to-execution data flows using synthetic canaries and payloads. No live endpoint was contacted, and the actual server-supplied payload and its subsequent behavior remain unknown. Wheel SHA-256: 003828175a747a9a3de8029e6a028ad2c3739abf1dad7b468b25636e391e91f4. --- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (9cf00d6eaf64906d3dc7feaf25f521d20d150832a04df89ecde5c66

osv:MAL-2026-17866

pyyi

Fixed versions: Not specified

Complete source record
{
  "id": "faa5a706ee073065f2fb63b9b4fcb1e924052b956b13d3719d3b07636080df12",
  "url": "https://osv.dev/vulnerability/MAL-2026-17866",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Malicious code in pyyi (PyPI)",
    "summary": "The verified PyPI wheel declares a console command named python2 (pyyi.cli:main). For commands other than the local REPL, help, version, unlock, or uninstall paths, it obtains configuration and calls run_payload(). Registration sends the hostname and OS to a configured space-z.ai server and stores the returned apiKey in ~/.python2/config.json. The REPL presents a normal Python banner but silently sends eligible single-token inputs to /api/cli/unlock as the password field, subject to filtering and attempt limits. run_payload() fetches code from /api/cli/payload, base64-decodes and gzip-decompresses it, then executes it in memory using exec(compile(src, '', 'exec'), g) at pyyi/cli.py:640 and calls its main function. Loader failures are disguised as Python's can't open file error. The malicious assessment is based on the combination of interpreter impersonation, concealed input transmission, remote code execution, and deliberate failure concealment, rather than encoding or exec alone. Static review and isolated, network-disabled mock tests confirmed the input-to-request and response-to-execution data flows using synthetic canaries and payloads. No live endpoint was contacted, and the actual server-supplied payload and its subsequent behavior remain unknown. Wheel SHA-256: 003828175a747a9a3de8029e6a028ad2c3739abf1dad7b468b25636e391e91f4. --- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (9cf00d6eaf64906d3dc7feaf25f521d20d150832a04df89ecde5c66",
    "evidence": "osv:MAL-2026-17866",
    "products": [
      {
        "name": {
          "value": "pyyi",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.4.1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.4.2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.4",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.5.5",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.5.2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.5.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.5.1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.5.4",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.5.3",
            "evidence": "/affected/0/versions"
          }
        ]
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "MAL-2026-17866",
      "aliases": [
        "MAL-2026-17866"
      ],
      "affected": [
        {
          "package": {
            "name": "pyyi",
            "purl": "pkg:pypi/pyyi",
            "ecosystem": "PyPI"
          },
          "versions": [
            "2.4.1",
            "2.4.2",
            "2.4",
            "2.5.5",
            "2.5.2",
            "2.5.0",
            "2.5.1",
            "2.5.4",
            "2.5.3"
          ],
          "database_specific": {
            "cwes": [
              {
                "name": "Embedded Malicious Code",
                "cweId": "CWE-506",
                "description": "The product contains code that appears to be malicious in nature."
              },
              {
                "name": "Embedded Malicious Code",
                "cweId": "CWE-506",
                "description": "The product contains code that appears to be malicious in nature."
              },
              {
                "name": "Embedded Malicious Code",
                "cweId": "CWE-506",
                "description": "The product contains code that appears to be malicious in nature."
              },
              {
                "name": "Embedded Malicious Code",
                "cweId": "CWE-506",
                "description": "The product contains code that appears to be malicious in nature."
              },
              {
                "name": "Embedded Malicious Code",
                "cweId": "CWE-506",
                "description": "The product contains code that appears to be malicious in nature."
              },
              {
                "name": "Embedded Malicious Code",
                "cweId": "CWE-506",
                "description": "The product contains code that appears to be malicious in nature."
              },
              {
                "name": "Embedded Malicious Code",
                "cweId": "CWE-506",
                "description": "The product contains code that appears to be malicious in nature."
              },
              {
                "name": "Embedded Malicious Code",
                "cweId": "CWE-506",
                "description": "The product contains code that appears to be malicious in nature."
              }
            ],
            "source": "https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/pyyi/MAL-2026-17866.json",
            "indicators": {
              "evidence_files": [
                {
                  "path": "pyyi/cli.py",
                  "tlsh": "c4b2d6239e055437c783c56d4c9bd281f32abc5326096438beddc2983f9953681bebd9",
                  "sha256": "e14690c4732c299897958337c1330b3bf8cd75b6c329ad093a6c68c155f66ab5"
                },
                {
                  "path": "pyyi-2.4.2.dist-info/entry_points.txt",
                  "sha256": "5822a9732e210360670b95de5c8b01bb8c6c40d66b781d7be1b4a679a0ba9ac8"
                }
              ],
              "package_integrity": [
                {
                  "hashes": {
                    "md5": "6738ab195bc9c4e5df9e40c2d3c092f9",
                    "sha256": "6248e67aa2d1755c9844f299f71948904eaa92fd4bfea324a4ef3ac938603fec",
                    "blake2b_256": "3d71fd5974df97a8e42c99d004aef168b69066be8e08f61c7e86d8b71a45f826"
                  },
                  "filename": "pyyi-2.4.2-py3-none-any.whl"
                }
              ]
            }
          }
        }
      ],
      "modified": "2026-10-20T19:00:04.334029277Z",
      "provider": "osv",
      "references": [
        "https://pypi.org/project/pyyi/2.4.2/",
        "https://pypi.org/project/pyyi/2.4/",
        "https://pypi.org/project/pyyi/2.5.5/",
        "https://pypi.org/project/pyyi/2.5.2/",
        "https://pypi.org/project/pyyi/2.5.0/",
        "https://pypi.org/project/pyyi/2.5.1/",
        "https://pypi.org/project/pyyi/2.5.4/",
        "https://pypi.org/project/pyyi/2.5.3/"
      ],
      "provider_metadata": {
        "iocs": {
          "urls": [
            "https://preview-chat-960504a9-b4e0-4b69-bc80-6ac3d4fa4ae0.space-z.ai/api/cli/init",
            "https://preview-chat-960504a9-b4e0-4b69-bc80-6ac3d4fa4ae0.space-z.ai/api/cli/unlock",
            "https://preview-chat-960504a9-b4e0-4b69-bc80-6ac3d4fa4ae0.space-z.ai/api/cli/payload"
          ],
          "domains": [
            "preview-chat-960504a9-b4e0-4b69-bc80-6ac3d4fa4ae0.space-z.ai",
            "b196q82k8891-d.space-z.ai"
          ]
        },
        "malicious-packages-origins": [
          {
            "id": "IN-MAL-2026-021509",
            "sha256": "7c36f3b8e69fc44eadb3a47bbb2b8a46d7beb8802aab88ca009b05d601d45fd0",
            "source": "amazon-inspector",
            "versions": [
              "2.4.2"
            ],
            "import_time": "2026-10-16T16:19:24.528469088Z",
            "modified_time": "2026-10-16T15:57:32Z"
          },
          {
            "id": "IN-MAL-2026-021508",
            "sha256": "7ac60870a568a1e1336d1d1696b9129a0f8bc13da7395fc24ed23ec4e8bf791e",
            "source": "amazon-inspector",
            "versions": [
              "2.4"
            ],
            "import_time": "2026-10-16T16:19:24.323941235Z",
            "modified_time": "2026-10-16T15:57:23Z"
          },
          {
            "id": "IN-MAL-2026-021539",
            "sha256": "9cf00d6eaf64906d3dc7feaf25f521d20d150832a04df89ecde5c667a4ac3d2d",
            "source": "amazon-inspector",
            "versions": [
              "2.5.5"
            ],
            "import_time": "2026-10-20T18:46:13.03647789Z",
            "modified_time": "2026-10-20T18:22:19Z"
          },
          {
            "id": "IN-MAL-2026-021543",
            "sha256": "9f5a8173a4900be512c6a66fd0eb76e30d1bd55f60b9ed931107447070d9d6e0",
            "source": "amazon-inspector",
            "versions": [
              "2.5.2"
            ],
            "import_time": "2026-10-20T18:46:13.337143615Z",
            "modified_time": "2026-10-20T18:44:55Z"
          },
          {
            "id": "IN-MAL-2026-021545",
            "sha256": "c2b987db2bc9b14bd26856280ea2a0ef32b6d5f168cee211959dc9aadc7dcbbf",
            "source": "amazon-inspector",
            "versions": [
              "2.5.0"
            ],
            "import_time": "2026-10-20T18:46:13.471084573Z",
            "modified_time": "2026-10-20T18:45:09Z"
          },
          {
            "id": "IN-MAL-2026-021541",
            "sha256": "4765ecf214740c466954b89b776b0db7a87eeec0d1e5c4dbfb2e91ba5d688692",
            "source": "amazon-inspector",
            "versions": [
              "2.5.1"
            ],
            "import_time": "2026-10-20T18:46:13.191830193Z",
            "modified_time": "2026-10-20T18:44:41Z"
          },
          {
            "id": "IN-MAL-2026-021538",
            "sha256": "79b1360595b32736c76d9cb0ee954382456bf44a18af80dbe78d84884ba0e0cc",
            "source": "amazon-inspector",
            "versions": [
              "2.5.4"
            ],
            "import_time": "2026-10-20T18:46:12.919153311Z",
            "modified_time": "2026-10-20T18:22:10Z"
          },
          {
            "id": "IN-MAL-2026-021540",
            "sha256": "7f723466cb3f5d65fafcc0022b32dc408b67a7b33fb5cc0060672434bf1fc406",
            "source": "amazon-inspector",
            "versions": [
              "2.5.3"
            ],
            "import_time": "2026-10-20T18:46:13.129595505Z",
            "modified_time": "2026-10-20T18:22:25Z"
          }
        ]
      }
    },
    "related_cves": [],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 390161,
  "published_at": "2026-10-16T15:57:23+00:00"
}