MAL-2026-20604: Malicious code in git-crt-creator (npm)
--- -= Per source details. Do not edit below this line.=-
Source: amazon-inspector (33542ef7bb719b629d51202ceddc0f0c6aee23f4342cb19b851d4a6613f45610) git-crt-creator is part of the Ghost Compiler campaign, a cluster of npm packages published by the account jikaya497 (jikaya497@gmail.com) between October and November 2026. The weaponized packages in this campaign register themselves as tsc, the TypeScript compiler command, and hide their payload in a file that reads as a JavaScript comment but runs as a shell script.
How it executes: from version 1.0.2, package.json maps bin.tsc to ./index.js, so installing the package links nodemodules/.bin/tsc to that file. Whichever package is installed last owns that link, so installing git-crt-creator after typescript replaces the real compiler. index.js has no shebang line and is marked executable (mode 0755). When a build script or CI step runs tsc, the kernel cannot execute the file directly and the shell falls back to interpreting it as a shell script. The command substitution inside what a reviewer reads as a JavaScript comment then runs.
Payload in 1.0.3 and 10.13.0 (GitHub Actions secret theft): the script downloads memdump.py from GitHub gist madder-g/d3f2f180c7ed4925de58e5f32d2a00a8 (sha256 3f43650218b53a0391925a612b2d1c3a897ca5e0a3ada2b15d807e4528830102) and runs it with sudo python3. The script finds the GitHub Actions Runner.Worker process and dumps its readable memory. The chain extracts every masked secret held there (entries matching "<name>":{"value":"<value>","isSecret":true}), base64-encodes them and posts them as the body of a new issue titled "Claude bot" in the repository hiko97851/podzal through https://api.github.com/repos/hiko97851/podzal/issues, authenticating with the job's own GITHUBTOKEN. Every secret exposed to the job leaves the runner. The base64 encoding keeps the stolen values from being recognized by secret scanning, and the traffic goes only to api.github.com and gist.githubusercontent.com, so it blends in with normal CI egress. The sink repository already contains secrets captured from GitHub Actions runs. Version 10.13.0 is byte-identical to 1.0.3 apart from its version number, republished so it wins semver ranges.
Version 1.0.2: uses the same tsc hijack to send one POST to the same GitHub issues endpoint, authenticating with the runner's GITHUBTOKEN and carrying a static body. It does not collect data from the host, but it executes undisclosed network code whenever tsc runs and was the test release for the theft chain above.
Indicators: nodemodules/.bin/tsc resolving to any package other than typescript; a bin-exposed .js file with no shebang and mode 0755; CI requests to gist.githubusercontent.com/madder-g/ or to api.github.com/repos/hiko97851/podzal/issues; issues titled "Claude bot" in hiko97851/podzal.
Any CI pipeline that installed these versions and then ran tsc should rotate every secret available to that workflow, including cloud, registry-publishing and API credentials.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Operational
For any CI pipeline that installed the affected versions and ran tsc, rotate every secret available to that workflow, including cloud, registry-publishing, and API credentials.
Event History
Frequently Asked Questions
Who is exposed to code execution from this package?
Projects that install git-crt-creator and subsequently run the tsc command in a build script or CI job are exposed when this package is the last package to provide that command. Installing it after typescript replaces the real tsc link in node_modules/.bin.
What triggers the payload?
The payload runs when tsc is invoked. Although index.js appears to be JavaScript, it has no shebang and is executable, causing the shell fallback to interpret it as a shell script and execute command substitution embedded in a comment.
Which versions are specifically identified, and what should CI users check?
The tsc command mapping is present from version 1.0.2. Versions 1.0.3 and 10.13.0 are identified as carrying a payload for GitHub Actions secret theft, so GitHub Actions environments that installed either version and ran tsc should be reviewed for possible secret exposure.
How can I determine whether the legitimate TypeScript compiler was replaced?
Check whether node_modules/.bin/tsc is linked to git-crt-creator's ./index.js rather than the TypeScript compiler. The package installed last among packages that register tsc owns that link.