{"id":"MAL-2026-11138","revision":"9f21e3b0b05344e288b03ad21c39d5bf","records":[{"revision":"9f21e3b0b05344e288b03ad21c39d5bf","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-11138","aliases":[],"title":"Malicious code in json-schema-inspector (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (023b104d04c30fccd05f5db5842a2d8735c572eb13cfbb5ca7ba763eeb525429)\nThe package advertises itself as a JSON/XML schema validator, but both public entry points (validateJson, validateXml in lib/core.js) invoke a trigger() routine that performs remote code execution against the installer's host. The C2 URL is stored as XOR-encoded hex (key 0x55) and decodes to a manifest hosted at https://cdn.jsdelivr.net/gh/cryptonomad411/cool-utils/package.json. The manifest supplies per-platform payload URLs (wurl/lrurl/laurl/mrurl/maurl) selected by process.platform and process.arch. lib/core.js then spawns node -e (Windows) or sh -c (Linux/macOS) at lines 97 and 114 to execute AES-256-CBC-decrypted staging scripts (aesDecrypt with a statically-derived key) that run the fetched payload. Execution is gated by sandbox-evasion checks in isEnvironment() (os.uptime() >= 300s, os.cpus().length >= 2, os.totalmem() >= 2GB) and a one-shot lock file at ~/.cache/.<hostname>.lock (or %APPDATA%\\.cache\\.<hostname>.lock) so the dropper runs once per victim. The combined obfuscation of the C2 URL and staging scripts, the sandbox-evasion gating, the per-host persistence marker, and the mismatch between advertised purpose (schema validation) and shipped behavior (attacker-controlled code execution) together confirm hostile intent.\n","state":0,"publishedAt":"2026-07-28T13:41:27+00:00","modifiedAt":"2026-07-28T14:37:01.5582565+00:00","affected":[{"ecosystem":"npm","name":"json-schema-inspector","ranges":[],"versions":["1.1.5","1.1.7","1.1.6","1.1.4"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/json-schema-inspector/v/1.1.5","https://www.npmjs.com/package/json-schema-inspector/v/1.1.7","https://www.npmjs.com/package/json-schema-inspector/v/1.1.6","https://www.npmjs.com/package/json-schema-inspector/v/1.1.4"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-11138","license":"OSV · upstream source license applies","key":"osv:MAL-2026-11138","identifiers":["MAL-2026-11138"]},"retained":false,"historicalAffected":[]}],"coverage":[]}