VDB
EN

MAL-2026-4705

Malicious code in vite-json-config (npm)

상세

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

## Source: amazon-inspector (9a7c9683fed8b8696938eb7ad88e158f70a075851b0dd511af991ecd69a4d0fd) The package presents itself as a vite/tsconfig path helper and clones the public API of tsconfig-paths (createMatchPath, matchFromAbsolutePaths, register, loadConfig). A new exported `configJson` entry point spawns a detached `node lib/mapProps.js` child process via `child_process.spawn(..., { detached: true, stdio: 'ignore' })` (lib/config-loader.js). lib/mapProps.js performs an HTTPS GET to https://www.jsonkeeper.com/b/5IZTJ — an anonymous, mutable JSON paste host — and passes the response's `Cookie` field directly to `new Function('require', s)(require)`, giving the publisher arbitrary code execution inside the consumer process with full `require` access. The fetch URL and header are concealed by shadowing `process` with a local object whose `env` uses cover-story names (DEV_API_KEY, DEV_SECRET_KEY, DEV_SECRET_VALUE) that actually hold the C2 URL and HTTP header. There is no integrity check on the fetched payload; the paste content can be changed at any time by whoever controls the jsonkeeper.com entry. Combined with the cloned legitimate-package API surface, this is a deliberate supply-chain dropper, not a coding mistake.

이 버전이 영향받나요?

사용 중인 패키지 버전을 입력하면 즉시 평가합니다.

영향 패키지

npm / vite-json-config

No fixed version published yet for vite-json-config (npm). Pin to a known-safe version or switch to an alternative.

참고