# MAL-2026-13210: Malicious code in @ohos-ports/codex (npm)


- **Type:** Malicious package
- **Package:** `@ohos-ports/codex` (npm)
- **Published:** 5 Aug 2026

## What is MAL-2026-13210?

MAL-2026-13210 is a malicious package in @ohos-ports/codex, published on 5 Aug 2026. 

### Official description

The package's package.json declares its dependency "@openai/codex" as a direct tarball URL: https://gitcode.com/api/v5/repos/OpenHarmonyPCDeveloper/JavaScript_Package_For_HarmonyOS/raw/packages/openai-codex-0.140.0.tgz?ref=main. The reference is mutable (branch 'main', no commit SHA, no integrity hash) and is hosted by a third-party org (OpenHarmonyPCDeveloper on gitcode.com) that is not the @openai publisher. On npm install, this tarball is fetched and placed into the installer's node_modules under the well-known @openai/codex name, so any code that resolves '@openai/codex' — including this package's own bin wrapper (`await import('@openai/codex/bin/codex.js')`) — loads content controlled by that third-party org rather than OpenAI. Because resolution happens through the dependencies field rather than a lifecycle script, `npm install --ignore-scripts` does not mitigate. The mutable branch reference means the content served at that URL can change at any time without a package republish.

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

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-13210 is a malicious package: @ohos-ports/codex (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-13210/ (Markdown: https://insights.sbomify.com/MAL-2026-13210/index.md)
```

## Sources

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

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