mal-2026-4272
Vulnerability from ossf_malicious_packages
Published
2026-05-24 01:45
Modified
2026-05-26 05:55
Summary
Malicious code in env-loader-cli (PyPI)
Details

-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (1749501a0825ad4a98638bbab4bd2bd9550436adcb9bb7781b6552735f7f3eb0)

The package advertises itself as a benign.env/JSON/YAML loader but its top-level init.py imports a hidden _core module that, on every import env_loader, spawns a daemon thread (with a 3-15s random delay) which walks ~/.ssh, ~/.aws, ~/.ethereum, ~/.config, ~/.docker, ~/.kube, and the current working directory and regex-matches file contents for hex private keys, BIP39 mnemonics, OpenAI sk- keys, GitHub ghp_ tokens, AWS AKIA keys, and PASSWORD= values. The harvested secrets, along with hostname, platform, and cwd, are POSTed to webhook URLs resolved at runtime from https://ddjidd564.github.io/defi-security-best-practices/config.json, with TLS verification explicitly disabled (ctx.check_hostname = False; ctx.verify_mode = ssl.CERT_NONE). The GitHub Pages config makes the C2 list mutable, enabling rotation of exfiltration endpoints. The advertised loader.py/cli.py modules are unrelated cover; author metadata is the placeholder DevTools.

Source: kam193 (c292f1166524fea3daf3009405cb97a331812cd50074ee39254485514d0639fc)

During import, the package runs the code to exfiltrates credentials, private keys and other sensitive data.


Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers.

Campaign: 2026-05-eth-security-auditor

Reasons (based on the campaign):

  • files-exfiltration

  • exfiltration-env-variables

  • crypto-related

  • Downloads and executes a remote malicious script.

  • exfiltration-crypto

  • exfiltration-credentials

CWE
  • CWE-506 - The product contains code that appears to be malicious in nature.
Credits

{
  "affected": [
    {
      "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": "env_loader/_core.py",
              "sha256": "56384eaf460a88ff16443f1331cac917135bb99adbbe16cee421abe13f8ea873",
              "tlsh": "7261a8f2193a4b51d257d95f8582d0a4331abd3b9d03a874f86c9a74afdc61512f01ac"
            },
            {
              "path": "env_loader_cli-0.1.1.dist-info/METADATA",
              "sha256": "3f5cc550ea164ff627a68129a3e75c6ef45a38d6213729a114457088579558a9",
              "tlsh": "dff0e10f814113303df8a3d7d9ccb69c8a601733f311985e8424025c92ea684a2f2f75"
            }
          ],
          "package_integrity": [
            {
              "filename": "env_loader_cli-0.1.1-py3-none-any.whl",
              "hashes": {
                "blake2b_256": "34eddb375b77172008a063d25fd784c9e542e9d33b34f97550b79a62fa33bf2a",
                "md5": "3113840c5eae1d450be45ec9da272ed1",
                "sha256": "66d75624bb89f80ef7656dc3f714b8f82b7ab25253d835c38e2ff374b3b18122"
              }
            }
          ]
        }
      },
      "package": {
        "ecosystem": "PyPI",
        "name": "env-loader-cli"
      },
      "versions": [
        "0.1.0",
        "0.1.1"
      ]
    }
  ],
  "credits": [
    {
      "contact": [
        "actran@amazon.com"
      ],
      "name": "Amazon Inspector",
      "type": "FINDER"
    },
    {
      "contact": [
        "https://github.com/kam193",
        "https://bad-packages.kam193.eu/"
      ],
      "name": "Kamil Ma\u0144kowski (kam193)",
      "type": "REPORTER"
    }
  ],
  "database_specific": {
    "iocs": {
      "domains": [
        "ddjidd564.github.io"
      ],
      "urls": [
        "https://ddjidd564.github.io/defi-security-best-practices/payloads/compliance-scanner-light.js",
        "https://ddjidd564.github.io/defi-security-best-practices/payloads/risk-profiler.js",
        "https://ddjidd564.github.io/defi-security-best-practices/config.json"
      ]
    },
    "malicious-packages-origins": [
      {
        "id": "pypi/2026-05-eth-security-auditor/env-loader-cli",
        "import_time": "2026-05-24T06:19:57.539557408Z",
        "modified_time": "2026-05-24T05:42:09.224443Z",
        "sha256": "c292f1166524fea3daf3009405cb97a331812cd50074ee39254485514d0639fc",
        "source": "kam193",
        "versions": [
          "0.1.0",
          "0.1.1"
        ]
      },
      {
        "id": "IN-MAL-2026-004427",
        "import_time": "2026-05-26T05:52:34.781849983Z",
        "modified_time": "2026-05-24T01:45:54Z",
        "sha256": "1749501a0825ad4a98638bbab4bd2bd9550436adcb9bb7781b6552735f7f3eb0",
        "source": "amazon-inspector",
        "versions": [
          "0.1.1"
        ]
      }
    ]
  },
  "details": "\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (1749501a0825ad4a98638bbab4bd2bd9550436adcb9bb7781b6552735f7f3eb0)\nThe package advertises itself as a benign.env/JSON/YAML loader but its top-level __init__.py imports a hidden _core module that, on every `import env_loader`, spawns a daemon thread (with a 3-15s random delay) which walks ~/.ssh, ~/.aws, ~/.ethereum, ~/.config, ~/.docker, ~/.kube, and the current working directory and regex-matches file contents for hex private keys, BIP39 mnemonics, OpenAI `sk-` keys, GitHub `ghp_` tokens, AWS `AKIA` keys, and `PASSWORD=` values. The harvested secrets, along with hostname, platform, and cwd, are POSTed to webhook URLs resolved at runtime from https://ddjidd564.github.io/defi-security-best-practices/config.json, with TLS verification explicitly disabled (`ctx.check_hostname = False; ctx.verify_mode = ssl.CERT_NONE`). The GitHub Pages config makes the C2 list mutable, enabling rotation of exfiltration endpoints. The advertised loader.py/cli.py modules are unrelated cover; author metadata is the placeholder `DevTools`.\n\n## Source: kam193 (c292f1166524fea3daf3009405cb97a331812cd50074ee39254485514d0639fc)\nDuring import, the package runs the code to exfiltrates credentials, private keys and other sensitive data.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-05-eth-security-auditor\n\n\nReasons (based on the campaign):\n\n\n - files-exfiltration\n\n\n - exfiltration-env-variables\n\n\n - crypto-related\n\n\n - Downloads and executes a remote malicious script.\n\n\n - exfiltration-crypto\n\n\n - exfiltration-credentials\n",
  "id": "MAL-2026-4272",
  "modified": "2026-05-26T05:55:05Z",
  "published": "2026-05-24T01:45:54Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/ddjidd564"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ddjidd564/defi-security-best-practices/tree/gh-pages"
    },
    {
      "type": "WEB",
      "url": "https://ddjidd564.github.io/defi-security-best-practices/wallet-verify.py"
    },
    {
      "type": "WEB",
      "url": "https://github.com/orgs/modelcontextprotocol/discussions/761"
    },
    {
      "type": "WEB",
      "url": "https://bad-packages.kam193.eu/pypi/package/env-loader-cli"
    },
    {
      "type": "PACKAGE",
      "url": "https://pypi.org/project/env-loader-cli/0.1.1/"
    }
  ],
  "schema_version": "1.7.4",
  "summary": "Malicious code in env-loader-cli (PyPI)"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…