{"id":"MAL-2026-6722","revision":"8f8fed71d0e642188af24fb4315feddd","records":[{"revision":"8f8fed71d0e642188af24fb4315feddd","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-6722","aliases":[],"title":"Malicious code in date-fns-lite (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (4694a079d83e33dcee7f87140c41737009d9f0b19f351c23f2ae3dbce9a47a51)\ndate-fns-lite@1.0.10 presents as a lightweight date-formatting utility but ships a malicious postinstall.js that runs automatically on `npm install`. The script harvests installer-side secrets — AWS credentials (~/.aws), GCP application-default credentials, Azure tokens, kubeconfig, SSH private keys and authorized_keys, /etc/shadow, and shell history — using /proc/1/root traversal to reach the host filesystem from inside a container. It also queries the AWS IMDS endpoint (http://169.254.169.254/latest/meta-data/iam/security-credentials/) and GCP metadata service for instance IAM credentials, probes the Docker socket via /proc/1/root/var/run/docker.sock to enumerate containers, and performs internal-network reconnaissance (default-gateway detection, /24 ping sweep, port probes on 22/80/443/3306/6379/9200/27017). The aggregated report is POSTed to a hardcoded bare-IP endpoint at http://115.190.124.243:9082/callback over plain HTTP. The package name mimics the widely-used `date-fns` library, and index.js contains a small plausible-looking date formatter as cover for the postinstall payload. Installing this package on any host — especially in CI or a container with host mounts — will disclose cloud credentials, SSH keys, and an internal-network map to the attacker.\n\n## Source: ossf-package-analysis (7c5de26d6b059360fd9639f3fa4545a86a377e44d5b158d03ec80a5ba47c4771)\nThe OpenSSF Package Analysis project identified 'date-fns-lite' @ 1.0.11 (npm) as malicious.\n\nIt is considered malicious because:\n\n- The package executes one or more commands associated with malicious behavior.\n","state":0,"publishedAt":"2026-07-01T12:21:14+00:00","modifiedAt":"2026-07-23T07:51:20.8332991+00:00","affected":[{"ecosystem":"npm","name":"date-fns-lite","ranges":[],"versions":["1.0.5","1.0.9","1.0.11","1.0.0","1.0.1","1.0.6","1.0.10","1.0.8","1.0.2","1.0.7","1.0.3","1.0.12","1.0.4"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/date-fns-lite/v/1.0.5","https://www.npmjs.com/package/date-fns-lite/v/1.0.9","https://www.npmjs.com/package/date-fns-lite/v/1.0.11","https://www.npmjs.com/package/date-fns-lite/v/1.0.0","https://www.npmjs.com/package/date-fns-lite/v/1.0.1","https://www.npmjs.com/package/date-fns-lite/v/1.0.6","https://www.npmjs.com/package/date-fns-lite/v/1.0.10","https://www.npmjs.com/package/date-fns-lite/v/1.0.8","https://www.npmjs.com/package/date-fns-lite/v/1.0.2","https://www.npmjs.com/package/date-fns-lite/v/1.0.7","https://www.npmjs.com/package/date-fns-lite/v/1.0.3","https://www.npmjs.com/package/date-fns-lite/v/1.0.12","https://www.npmjs.com/package/date-fns-lite/v/1.0.4"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-6722","license":"OSV · upstream source license applies","key":"osv:MAL-2026-6722","identifiers":["MAL-2026-6722"]},"retained":false,"historicalAffected":[]}],"coverage":[]}