VulnWatch by ve1ve2
unknown

MAL-2026-6228: Malicious code in base_parts_ai (npm)

Source:
OSV.dev
Published:
Fetched:
Updated:
Affects:
base_parts_ai

https://osv.dev/vulnerability/MAL-2026-6228 ↗

osvnpmno-fix-yet

Malicious code in base_parts_ai (npm) --- _-= 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 --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. Affected: npm:base_parts_ai No fixed version published yet References: https://www.npmjs.com/package/base_parts_ai/v/1.0.52 https://www.npmjs.com/package/base_parts_ai/v/1.0.50 https://www.npmjs.com/package/base_parts_ai/v/1.0.66 https://www.npmjs.com/package/base_parts_ai/v/1.0.67