Malicious code in db-query-log (npm)
The npm package 'db-query-log' version 1.0.1 contains malicious code that fetches and executes attacker-controlled JavaScript code at runtime. It disguises a remote code execution backdoor by decoding a hardcoded base64 URL pointing to an attacker-controlled JSON paste site, retrieving code, and executing it within the Node.js process. This behavior is hidden from static analysis and misrepresents its origin by referencing unrelated upstream repositories. Any system running this package is at risk of full compromise.
AI Analysis
Technical Summary
The 'db-query-log' npm package (version 1.0.1) includes a method queryDBConnect() that base64-decodes a hardcoded URL to an attacker-controlled JSON paste site (https://www.jsonkeeper.com/b/ZIAIK). It fetches the 'data.content' field from this URL using axios and compiles and executes the fetched JavaScript code dynamically inside the Node.js process via new Module()._compile(). The URL is stored as a base64 literal (HASH_KEY) and decoded at runtime to evade static detection. Errors in this fetch-and-execute process are silently ignored. The package metadata falsely claims to be related to the 'divbloxjs/dx-db-connector' project, but the malicious remote execution method is not part of that upstream API. This results in arbitrary code execution with the privileges of the Node.js process running the package.
Potential Impact
Any system that installs and runs 'db-query-log' version 1.0.1 is vulnerable to arbitrary remote code execution controlled by an attacker. This can lead to full system compromise, including theft or destruction of secrets, keys, and other sensitive data. Because the malicious code executes with the installer's privileges, the attacker gains extensive control over the affected environment. The compromise risk extends beyond the package itself, as attackers may have installed additional malware or backdoors.
Mitigation Recommendations
No official patch or fix is currently available. Immediate removal of the 'db-query-log' package version 1.0.1 is strongly recommended. Systems with this package installed should be considered fully compromised. All secrets, keys, and credentials stored on affected systems must be rotated from a separate, trusted environment. Due to the high likelihood of persistent compromise, a full system rebuild or forensic investigation may be necessary to ensure eradication of attacker presence.
Malicious code in db-query-log (npm)
Description
The npm package 'db-query-log' version 1.0.1 contains malicious code that fetches and executes attacker-controlled JavaScript code at runtime. It disguises a remote code execution backdoor by decoding a hardcoded base64 URL pointing to an attacker-controlled JSON paste site, retrieving code, and executing it within the Node.js process. This behavior is hidden from static analysis and misrepresents its origin by referencing unrelated upstream repositories. Any system running this package is at risk of full compromise.
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 'db-query-log' npm package (version 1.0.1) includes a method queryDBConnect() that base64-decodes a hardcoded URL to an attacker-controlled JSON paste site (https://www.jsonkeeper.com/b/ZIAIK). It fetches the 'data.content' field from this URL using axios and compiles and executes the fetched JavaScript code dynamically inside the Node.js process via new Module()._compile(). The URL is stored as a base64 literal (HASH_KEY) and decoded at runtime to evade static detection. Errors in this fetch-and-execute process are silently ignored. The package metadata falsely claims to be related to the 'divbloxjs/dx-db-connector' project, but the malicious remote execution method is not part of that upstream API. This results in arbitrary code execution with the privileges of the Node.js process running the package.
Potential Impact
Any system that installs and runs 'db-query-log' version 1.0.1 is vulnerable to arbitrary remote code execution controlled by an attacker. This can lead to full system compromise, including theft or destruction of secrets, keys, and other sensitive data. Because the malicious code executes with the installer's privileges, the attacker gains extensive control over the affected environment. The compromise risk extends beyond the package itself, as attackers may have installed additional malware or backdoors.
Mitigation Recommendations
No official patch or fix is currently available. Immediate removal of the 'db-query-log' package version 1.0.1 is strongly recommended. Systems with this package installed should be considered fully compromised. All secrets, keys, and credentials stored on affected systems must be rotated from a separate, trusted environment. Due to the high likelihood of persistent compromise, a full system rebuild or forensic investigation may be necessary to ensure eradication of attacker presence.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-6539
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-5p8x-c32p-h2jc"]
- Ecosystems
- ["npm"]
Threat ID: 6a4c345127e9c797195fcf67
Added to database: 07/06/2026, 23:03:45 UTC
Last enriched: 08/20/2026, 16:59:16 UTC
Last updated: 09/13/2026, 03:18:22 UTC
Views: 47
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.
External Links
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.