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.
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.jsondeclares atscbin that points at its ownindex.js. The npm link atnode_modules/.bin/tscbelongs to whichever package was installed most recently. If this package lands aftertypescript, it displaces the genuine compiler. index.jscarries no shebang but is executable (mode 0755). When something invokestsc, 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
buildscript - 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/tscresolves into thetypescriptpackage. - 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.yamloryarn.lockin your repositories or build images referenceshyjui-klopaorjuyip-parser-helper. - On any developer machine or CI runner,
node_modules/.bin/tscresolves to a package other thantypescript. - 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.jsfile with no shebang and mode 0755. - Your
.npmrcor lockfiles reference a registry atweb.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
- Inventory now. Run these checks in each JavaScript/TypeScript repository and in cached CI workspaces:
npm ls hyjui-klopa juyip-parser-helpergrep -nE "hyjui-klopa|juyip-parser-helper|vitemaweed" package-lock.json pnpm-lock.yaml yarn.lock .npmrcls -l node_modules/.bin/tsc, confirming the link points intonode_modules/typescript
- 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.
- If anything matches, follow the advisory. Treat any machine that installed the package and then ran
tscas 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. - There is no version to upgrade to. Remove the package, reinstall
typescriptexplicitly, and regenerate the lockfile from a clean state. - Block the infrastructure. Add 194.163.166.19 and
web.vitemaweed.frto egress deny lists for build runners and developer networks. Not vendor guidance. - 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
.npmrcso no dependency can be fetched from an arbitrary host.
- Add a CI step that fails when any common tool bin (
What we don't know yet
- How many times
hyjui-klopa1.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-helperalongside this one. - Whether other campaign packages use the same
tschijack 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
6 min read
websocket-driver CVE-2026-140003: one request crashes Node, fix changes defaults
A pre-RFC handshake parser in websocket-driver lets one unauthenticated request kill a Node.js process; 0.8.0 fixes it but switches legacy draft support off by default.
5 min read
AWS HealthOmics MCP Server: linted workflow bundles could run code
A search-path flaw in the HealthOmics MCP Server's workflow linting tools means a bundle under inspection may supply code that runs as the server's user, so bundle provenance matters as much as version.
1 min read
NukeViet CVE-2026-94597: upload RCE hinges on Apache mod_php config
A four-step upload bypass in NukeViet becomes remote code execution only on Apache mod_php with short tags enabled, and conflicting registry data on the 4.6 fix may mislead scanners.