# MAL-2026-6788: Malicious code in datefmt-helper (npm)


- **Type:** Malicious package
- **Package:** `datefmt-helper` (npm)
- **Published:** 4 Jul 2026
- **Also known as:** GHSA-ch48-496p-pfv8

## What is MAL-2026-6788?

MAL-2026-6788 is a malicious package in datefmt-helper, published on 4 Jul 2026. 

### Official description

The npm package `datefmt-helper` is a supply-chain dropper disguised as a benign date-formatting utility (its `description` reads "dates formatting utility with locale support"). The package ships no source repository and places its real behaviour in an install script.

A `postinstall` lifecycle hook (`postinstall: node postinstall.js`) executes automatically on `npm install`, before the package is ever imported. The install script uses HTTP / `curl` / `wget` primitives to download a second-stage payload from the hardcoded external IP `115.190.124.243`, then executes it via a Node child process — the classic download-and-execute pattern. Any developer workstation or CI runner that installs the package (directly or transitively) hands arbitrary code execution to the operator of that endpoint.

On `npm install`, the package's postinstall script fetches an unauthenticated payload over plain HTTP from a hardcoded bare IP (115.190.124.243:8761) and executes it. On Unix, `curl`/`wget` output is piped directly to `sh`. On Windows, `certutil.exe -urlcache -split -f` downloads a batch file to C:\Users\Public\run.bat and executes it. The fetched content is unpinned, unverified, and mutable — the operator of the endpoint can serve arbitrary code at any time. The package advertises itself as a lightweight date formatter (`date-fns-lite` branding, impersonating the date-fns ecosystem), but the payload has no relationship to date formatting. The typosquat/impersonation branding combined with an install-time dropper is a supply-chain attack lure.

Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

## What should I do about MAL-2026-6788?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

## Fix prompt for AI coding agents

```text
MAL-2026-6788 is a malicious package: datefmt-helper (npm). Every version was published to cause harm.

Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.

Reference: https://insights.sbomify.com/MAL-2026-6788/ (Markdown: https://insights.sbomify.com/MAL-2026-6788/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/MAL-2026-6788

---
From sbomify Insights: https://insights.sbomify.com/MAL-2026-6788/
Summaries are generated and may contain mistakes; the official description above is the record.
