Malicious code in @chnayser/server (npm)
The npm package @chnayser/server contained malicious code that executes arbitrary shell scripts from an external domain (npm.nzeros.me) via an unauthenticated /api/update endpoint. Any client able to reach the server's bound address can trigger remote code execution under the server process.
- Disclosed
- Last updated
- Blast radius
- Any system running @chnayser/server with the malicious code, where the Express server is started and the /api/update endpoint is reachable.
- Ecosystems
- Attack vectors
- Affected entities
- @chnayser/servernpm package containing malicious code in dist/routes.js
The npm package @chnayser/server was found to contain malicious code in its dist/routes.js file. When the Express server is started via the advertised startServer or createApp entry points, it mounts a GET route at /api/update that executes a shell command via child_process.execSync.\n\nThe malicious handler fetches and executes a shell script from https://npm.nzeros.me/chnayser using curl and sh. This domain is unrelated to the package's declared publisher, indicating the package was compromised or intentionally published with malicious intent.\n\nThe /api/update endpoint requires no authentication and is framed as a health or update probe. The server binds to 127.0.0.1:4300 by default (configurable via a host option). Any client able to reach this address can trigger the malicious code execution, giving the attacker arbitrary remote code execution on the host running the server.\n\nThe fetched shell script content is mutable and controlled by the owner of npm.nzeros.me, allowing for persistent and evolving attacks. This incident was identified by the OpenSSF's malicious-packages project.
Indicators of compromise
- Packages
- @chnayser/server
- Domains
- npm.nzeros.me
Remediation
- Remove or uninstall @chnayser/server from all systems immediately
- Audit systems that had @chnayser/server installed for signs of compromise or unauthorized access
- Review network logs for connections to npm.nzeros.me from affected systems
- If the server was running and the /api/update endpoint was reachable, assume potential remote code execution occurred and perform full security incident response
- Do not install or update to any version of @chnayser/server from npm until the package is verified as safe by the maintainer or removed from the registry
Sources
- GitHub Advisory GHSA-c4jh-v6xv-2wpm · GitHub Advisory Database
Cite this entry
"Malicious code in @chnayser/server (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 6, 2026; last updated August 6, 2026. https://supplychainattack.org/incident/malicious-code-in-chnayser-server-npm-1qg2rh
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- resolvedcritical
Malicious code in autbank-core (npm)
The npm package autbank-core contained malicious preinstall and postinstall lifecycle hooks that exfiltrated environment variables, credentials, and system information to a hardcoded webhook.site endpoint during installation.
npmCompromised package - resolvedcritical
Malicious code in adxaa (npm)
The npm package adxaa contained obfuscated malicious JavaScript designed to target users of a specific WordPress site. The payload exfiltrates session data, deletes accounts, and hijacks credentials via email overwrite and password reset.
npmCompromised package - resolvedcritical
Malicious code in upload-to-gcp (npm)
upload-to-gcp@3.2.1 (npm) contains malicious code in its postinstall script that exfiltrates host identifiers to an attacker-controlled endpoint. The package masquerades as a Google Cloud Platform utility but performs unauthorized telemetry collection at install time.
npmCompromised package - resolvedcritical
Malicious code in akamai-sensor (npm)
A malicious npm package named akamai-sensor impersonated Akamai's legitimate sensor_data anti-bot SDK. The package contained hidden JavaScript code concealed using invisible Unicode characters and implemented a dynamic command-and-control channel via a Google Calendar dead-drop, enabling arbitrary code execution on installation.
npmCompromised packageTyposquatting