Malicious code in @7nohe/openapi-react-query-codegen (npm)
Description
The npm package @7nohe/openapi-react-query-codegen contains malicious code embedded in its tarball. A binding.gyp file abuses node-gyp's build process to execute an obfuscated JavaScript payload during installation, resulting in arbitrary code execution. The payload is a large obfuscated loader/dropper that cannot be inspected without execution. The package's legitimate purpose does not require native addons or such payloads, indicating deliberate malicious inclusion. Any system with this package installed should be considered fully compromised, and all secrets should be rotated immediately.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The @7nohe/openapi-react-query-codegen npm package includes a binding.gyp file at the package root that exploits node-gyp's automatic rebuild during npm install to execute a shell command running an obfuscated JavaScript file (3FWCvzduYZg.js). This file is a large XOR-obfuscated payload acting as a loader/dropper, with no legitimate build source present in the package. The package.json declares only the 'dist' directory as files, but the malicious files are included at the root, bypassing the declared publish surface. The package's advertised functionality does not require native addons or large obfuscated code, confirming the malicious intent. Installation of this package results in arbitrary code execution on the host system.
Potential Impact
Systems that install or run this package are fully compromised due to arbitrary code execution during installation. Attackers may gain full control over the affected system, potentially accessing all stored secrets and keys. Removal of the package alone does not guarantee eradication of all malicious artifacts or backdoors introduced by the payload.
Mitigation Recommendations
Immediate removal of the @7nohe/openapi-react-query-codegen package is required. All secrets and keys stored on the compromised system should be rotated from a separate, trusted machine. Due to the high likelihood of full system compromise, a full forensic investigation and system rebuild may be necessary. No official patch or fix is available; avoid using this package entirely.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-15494
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-rg27-qr39-ch6w"]
- Ecosystems
- ["npm"]
Threat ID: 6a92f7d8acd9273b49e75a54
Added to database: 08/29/2026, 15:16:40 UTC
Last enriched: 09/09/2026, 21:38:30 UTC
Last updated: 10/01/2026, 22:26:56 UTC
Views: 25
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.