# MAL-2026-6499: Malicious code in mongoose-json-format (npm)


- **Type:** Malicious package
- **Package:** `mongoose-json-format` (npm)
- **Published:** 26 Jun 2026
- **Also known as:** GHSA-8fxp-pghh-7w6w

## What is MAL-2026-6499?

MAL-2026-6499 is a malicious package in mongoose-json-format, published on 26 Jun 2026. 

### Official description

helpers.js defines a createLog() helper that base64-decodes a constant HASH_KEY to https://www.jsonkeeper.com/b/XVHGD (an anonymous JSON-paste host) and fetches the response, then passes data.data to a createLogger() function from the log-format-thread dependency. The destination URL is stored as a base64 literal to avoid plain-text discovery. However, the helper is never invoked from the package's main entry (index.js) in this version, and helpers.js itself contains broken code (an `import { req } from "request"` for an unused symbol, and a top-level `await` inside a non-async function) that would prevent the module from loading cleanly if it were required. The fetched content is also passed only to a logger formatter, not to eval/exec/Function/require — so even on the dead code path, the bytes are not executed as code. The combination of obfuscated URL + anonymous paste host + tampering shape is suspicious and inconsistent with a legitimate JSON-formatting helper, but the harmful path is not reached by a default require() of this package and there is no install-time lifecycle hook driving the fetch.

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-6499?

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-6499 is a malicious package: mongoose-json-format (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-6499/ (Markdown: https://insights.sbomify.com/MAL-2026-6499/index.md)
```

## Sources

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

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