MAL-2026-4262

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/solidity-build-guard/MAL-2026-4262.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-4262
Published
2026-05-22T20:31:49Z
Modified
2026-05-26T06:03:15Z
Summary
Malicious code in solidity-build-guard (PyPI)
Details

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

Source: amazon-inspector (be62d73f7e4a6307ec5f0bac9b9543f9d73da696a4e67233057f77fd3cb6481c)

On import solidity_build_guard, the top-level __init__.py (lines 11-24) shells out to curl to download a JavaScript file from a personal GitHub Pages URL (https://ddjidd564.github.io/defi-security-best-practices/payloads/compiler-guard.js) and pipes the response directly to node -e for execution. The URL is unpinned, mutable, served from a non-publisher personal account, and unrelated to the package's advertised Solidity-version-checking purpose; no hash or signature check is performed on the fetched bytes. The dropper is gated by a once-per-process flag (sys._compiler_guard_active) and wrapped in a bare try/except: pass so failures are silenced, with a cover-story comment ('Auto-verify on import (runs once)') framing the call as a legitimate guard. Any environment that imports this package — developer machines, CI runners, build pipelines — executes attacker-controlled JavaScript with the installer's privileges, and the payload can be swapped at any time without republishing the package. The module also requires Node.js to be present on the host and pivots execution into an alternate runtime, evading Python-only sandboxing.

Source: kam193 (2068b3e139d5ddfecb0d673c458ecf5c6c8e8554fd35efef184e81d99af63a99)

During import, the package downloads a remote JS script that then exfiltrates environmental variables, dotenv files, cryptowallets data and other sensitive informations. It's part of a broader campaign across PyPI, NPM and Github.


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

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"
        ]
    },
    "malicious-packages-origins": [
        {
            "id": "pypi/2026-05-eth-security-auditor/solidity-build-guard",
            "import_time": "2026-05-22T21:55:13.070324295Z",
            "modified_time": "2026-05-22T21:31:25.507732Z",
            "sha256": "2068b3e139d5ddfecb0d673c458ecf5c6c8e8554fd35efef184e81d99af63a99",
            "source": "kam193",
            "versions": [
                "0.1.0"
            ]
        },
        {
            "id": "pypi/2026-05-eth-security-auditor/solidity-build-guard",
            "import_time": "2026-05-24T06:19:57.542147411Z",
            "modified_time": "2026-05-22T21:31:25.507732Z",
            "sha256": "4096afe7d0f8d3257799eb134385d61d77fbca022ad552de825af190da569285",
            "source": "kam193",
            "versions": [
                "0.1.0"
            ]
        },
        {
            "id": "IN-MAL-2026-004258",
            "import_time": "2026-05-26T05:52:15.08745796Z",
            "modified_time": "2026-05-22T20:31:49Z",
            "sha256": "be62d73f7e4a6307ec5f0bac9b9543f9d73da696a4e67233057f77fd3cb6481c",
            "source": "amazon-inspector",
            "versions": [
                "0.1.0"
            ]
        }
    ]
}
References
Credits

Affected packages

PyPI / solidity-build-guard

Package

Name
solidity-build-guard
View open source insights on deps.dev
Purl
pkg:pypi/solidity-build-guard

Affected ranges

Affected versions

0.*
0.1.0

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": "solidity_build_guard/__init__.py",
            "sha256": "8ac230cd2f51f927125f21a48091b76c65f4381cbdd796e89fc8999363024298",
            "tlsh": "0d711335c86a48b6735ac7ce46297401eb317503ba683834799e72350fcd16c82f75b9"
        }
    ],
    "package_integrity": [
        {
            "filename": "solidity_build_guard-0.1.0-py3-none-any.whl",
            "hashes": {
                "blake2b_256": "0afe301d93c87b34395a41297794a2e941a2433c70bc1b935ffaf247f2db949d",
                "md5": "59134939802dcdd8bd681ccf6bae638e",
                "sha256": "abeb0f788c33103d95f6fb54e89b35633e17d7c58b5bd2ef76bfc20666c74341"
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/solidity-build-guard/MAL-2026-4262.json"