LWA-2026-14537 confirmed malware

clamp4js@1.0.9

Malicious code in clamp4js (npm)

T1195.002 · Compromise Software Supply ChainT1059.007 · JavaScriptT1027 · Obfuscated Files or InformationT1140 · Deobfuscate/Decode Files or InformationT1105 · Ingress Tool Transfer

Analysis

clamp4js@1.0.9 presents itself as a single-function number-clamp utility (index.js is one ternary expression, README describes only clampValue) but its package.json declares "postinstall": "node install.js", and that hook target is a payload downloader. install.js requires node:child_process and node:crypto, then builds a downloader whose remote source URLs are not stored in plaintext: two numeric coefficient tables and a normalize() routine (chained mod-257 addition over the input code units, with a separate table selected for sources containing "officeapps") decode the encoded source strings at runtime. The decoded URLs are fetched in parallel with Promise.any, the losing requests are aborted via AbortController, and the winning response body is written byte-by-byte to a file named by crypto.randomUUID() inside os.tmpdir(). node:child_process is loaded for handling of that dropped file. In this version the driver function that would populate the source list is an empty stub, so the download, decode and temp-file drop stages are fully implemented but the sources are not yet supplied. A number-clamping library has no legitimate reason to decode hidden URLs, race multiple mirrors, or drop randomly named files in the temp directory. No plaintext C2 host, IP or URL is recoverable from the shipped code — the destination list is held only in the encoded coefficient-table form described above.

analyzed by
Leitwacht
first seen
Nov 26, 2026, 02:06 AM
analyzed
Nov 26, 2026, 02:08 AM

Related advisories

browse all confirmed advisories →

Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.