High impactSecurityNo patch yet

Ghost Compiler: malicious npm package hyjui-klopa hijacks the tsc command

A malicious npm package in the Ghost Compiler campaign hijacks the tsc command and opens a reverse shell whenever a build, CI job, editor or hook compiles TypeScript.

Khalid Aboubakr Engineering DeskPublished

Automated engineering analysis by the Khalid Aboubakr Engineering Desk, from the primary sources listed below. Not reviewed by a person before publication. About the desk

Bottom line

hyjui-klopa 1.0.0 is malware, and no patched version exists or will exist: the only fix is removal. It replaces the TypeScript tsc command, so it fires at build time rather than install time, on developer machines and CI runners alike. Check what node_modules/.bin/tsc points to, search for outbound traffic to 194.163.166.19, and treat any host that ran the fake tsc as compromised.

What happened

On 25 November 2026 the GitHub Advisory Database published GHSA-h5fp-hqf3-rw92. It classifies the npm package hyjui-klopa version 1.0.0 as malware under CWE-506 (Embedded Malicious Code). The advisory credits OpenSSF. The underlying OSV record, MAL-2026-20606, names Amazon Inspector as the finder.

The advisory attributes the package to a campaign it calls Ghost Compiler: a group of npm packages from the account jikaya497, published between October and November 2026.

The mechanism:

  • The package's package.json declares a tsc bin that points at its own index.js. The npm link at node_modules/.bin/tsc belongs to whichever package was installed most recently. If this package lands after typescript, it displaces the genuine compiler.
  • index.js carries no shebang but is executable (mode 0755). When something invokes tsc, the shell ends up interpreting the file as a shell script. A command hidden in what looks like a JavaScript comment, dressed up as Sentry settings, then executes.
  • The result is a reverse shell. It runs with the privileges of whoever ran the build and connects to the operator's host at 194.163.166.19 on port 4445.
  • The same host serves a self-hosted npm registry on port 4873 (web.vitemaweed.fr), and other packages from this publisher pin their dependencies to it. The advisory also reports the same shell command, encrypted, inside another of the publisher's packages, juyip-parser-helper.

The advisory lists no patched versions. The registry entry states plainly that the package is malware.

Why it matters

Most npm malware advice focuses on install-time lifecycle scripts. This package does not need one. Its trigger is the ordinary act of compiling TypeScript, which happens in many places:

  • a build script
  • a CI job
  • an editor integration
  • a pre-commit hook

The code runs as the user doing the build. On a developer laptop that means SSH keys, cloud credentials and source access. On a CI runner it means whatever secrets the job holds, which often include deploy and publishing tokens.

The direct exposure is narrow: one package, one version, with an obscure name. Nobody depends on hyjui-klopa by accident through normal TypeScript use. The concern is how it could arrive:

  • as a transitive dependency of another campaign package;
  • through a typo or copy-paste in a manifest;
  • through tooling that installs packages without review.

The evidence does not say how many installs occurred or whether any victims exist.

Engineering assessment

Our assessment: this deserves attention well beyond its download count, because the technique generalises.

Any package can claim a common bin name. These names include tsc, eslint, prettier, vite and jest. Nothing in the evidence suggests npm warns when one package's bin silently replaces another's. Once that happens, every script that calls the short name runs the attacker's file.

The shebang-less trick also defeats a quick code review. A reviewer opening index.js sees what reads as a harmless comment.

Install-time defences do not obviously help here. Disabling lifecycle scripts stops postinstall payloads, but this attack fires later, when the build runs. The evidence does not say whether --ignore-scripts, pnpm or yarn change how the bin link is created. Until that is established, teams should not assume script blocking protects them. Treat it as unverified.

The controls that do apply are the following:

  • Lockfile review. A new top-level or transitive dependency with a random-looking name should fail review.
  • Bin-resolution checks. Verify that node_modules/.bin/tsc resolves into the typescript package.
  • Egress restriction on CI runners. Builds should not be able to open arbitrary outbound TCP connections.

The self-hosted registry on port 4873 matters too. Other packages from this publisher pull dependencies from attacker infrastructure, so the operator can change what those packages deliver without publishing anything new to npm. Blocking or flagging one package name is therefore insufficient. The publisher account and the infrastructure are the better indicators.

The advisory's response guidance is to rebuild the host and rotate credentials. That is the right call, not an overreaction. An interactive shell gives the operator full control of the machine. Cleaning node_modules does nothing about what happened during the session.

Is this you?

  • Any package-lock.json, pnpm-lock.yaml or yarn.lock in your repositories or build images references hyjui-klopa or juyip-parser-helper.
  • On any developer machine or CI runner, node_modules/.bin/tsc resolves to a package other than typescript.
  • Network, firewall or EDR logs show outbound TCP connections to 194.163.166.19 on port 4445 or 4873.
  • Your projects contain a bin-exposed .js file with no shebang and mode 0755.
  • Your .npmrc or lockfiles reference a registry at web.vitemaweed.fr. (Not vendor guidance; this extends the advisory's infrastructure detail.)

If none of these apply, you have no evidence of direct exposure to this package. That does not rule out other packages in the campaign.

What to do

  1. Inventory now. Run these checks in each JavaScript/TypeScript repository and in cached CI workspaces:
    • npm ls hyjui-klopa juyip-parser-helper
    • grep -nE "hyjui-klopa|juyip-parser-helper|vitemaweed" package-lock.json pnpm-lock.yaml yarn.lock .npmrc
    • ls -l node_modules/.bin/tsc, confirming the link points into node_modules/typescript
  2. Hunt the network indicator. Search egress, firewall and proxy logs for connections to 194.163.166.19 on ports 4445 and 4873. This is advisory guidance.
  3. If anything matches, follow the advisory. Treat any machine that installed the package and then ran tsc as compromised. Rotate every credential reachable from that user or CI job, including cloud keys, npm and Git tokens, SSH keys and deployment secrets. Then rebuild the host rather than cleaning it.
  4. There is no version to upgrade to. Remove the package, reinstall typescript explicitly, and regenerate the lockfile from a clean state.
  5. Block the infrastructure. Add 194.163.166.19 and web.vitemaweed.fr to egress deny lists for build runners and developer networks. Not vendor guidance.
  6. Plan the structural fix. Not vendor guidance.
    • Add a CI step that fails when any common tool bin (tsc, eslint, vite, jest) resolves outside its expected package.
    • Require review of lockfile additions.
    • Restrict outbound network access from CI runners to known registries and endpoints.
    • Pin registries in .npmrc so no dependency can be fetched from an arbitrary host.

What we don't know yet

  • How many times hyjui-klopa 1.0.0 was downloaded or installed, and whether npm has removed it.
  • The full list of Ghost Compiler packages. The evidence names only juyip-parser-helper alongside this one.
  • Whether other campaign packages use the same tsc hijack or different triggers.
  • Whether any real compromises have occurred. The evidence is silent.
  • Whether --ignore-scripts, pnpm or yarn alter how the hijacking bin link is created.

The desk will check the OpenSSF malicious-packages repository and the GitHub Advisory Database for further campaign entries and for registry takedown status.

Sources

Latest engineering analysis