Malicious code in reactlogo-load (npm)
Affects reactlogo-loadSource GCVE Database
Rated by Threat Radar
Data as of 09/09/2026, 14:00:34 UTC
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmreactlogo-load | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Users should immediately cease using this package and remove it from their projects. Avoid installing or running code from untrusted or unknown npm packages. Monitor for updates or advisories from the package maintainers or npm registry regarding this issue.
Description
The npm package reactlogo-load version 1.0.0 contains malicious code that executes arbitrary attacker-controlled scripts. Its loadLogo() function extracts a URL hidden in a PNG image using LSB encoding, fetches the code from that URL, and executes it via a reflective Function constructor invocation. The code obfuscates the use of 'constructor' and 'Function' to evade detection. Execution occurs in the Node.js runtime context, granting full access to the host environment. Using this package as documented triggers the malicious code execution, posing a severe risk to any system that includes it.
Impact
Any system that installs and uses reactlogo-load version 1.0.0 and invokes the loadLogo() function as documented will execute arbitrary code fetched from an attacker-controlled URL. This results in full compromise of the host environment, including the ability to run any Node.js code with the privileges of the calling process. This is a critical security risk as it enables remote code execution and potential full system takeover.
Summary
The reactlogo-load npm package (version 1.0.0) masquerades as a logo/color utility but contains a malicious loadLogo() function. This function decodes a URL embedded in the least significant bits of a PNG image, fetches the remote code from that URL, and executes it dynamically using a reflective Function constructor. The package hides the use of 'constructor' and 'Function' through a deterministic string-shuffle helper named hsvMean, avoiding plaintext detection of these keywords or the destination URL. The executed code runs with full Node.js runtime capabilities by binding global.require, module, and exports, allowing arbitrary code execution on any host that uses this package as per its README instructions.