Malicious code in db-query-log (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (4928f7d380b79104d997e7666603726873158508c38d2c75a90c7529dd196be3) The package presents itself as a database query helper but index.js defines a method queryDBConnect() that base64-decodes a hardcoded URL pointing to https://www.jsonkeeper.com/b/ZIAIK (an anonymous, attacker-mutable JSON paste host), fetches the.data.content field via axios, and compiles and executes the response as a Node module via new Module()._compile(...). The destination URL is stored as a base64 literal named HASH_KEY and decoded with atob() at runtime, hiding it from static inspection, and errors in the fetch-and-execute path are silently swallowed. Package metadata further misrepresents the project: package.json declares the name 'db-query-log' while repository/homepage/bugs all point to github.com/divbloxjs/dx-db-connector and the exported class is DivbloxDatabaseConnector, with the remote-exec method absent from that upstream's API. Any consumer that calls into the package's connector and reaches this code path will execute arbitrary attacker-controlled JavaScript inside the Node.js process with the installer's privileges. ## Source: ghsa-malware (a5d245a2e918e8af41a64a320689397803dea5a0d84fc792f900fa8995e3f589) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
AI Analysis
Technical Summary
The 'db-query-log' npm package (version 1.0.1) includes a method queryDBConnect() that base64-decodes a hardcoded URL pointing to an attacker-controlled JSON paste service. It fetches the content field from this URL using axios, then compiles and executes the fetched JavaScript code within the Node.js process using new Module().compile(), effectively allowing remote code execution. The malicious URL is obfuscated via base64 encoding and decoded at runtime to evade static detection. Package metadata falsely claims association with the legitimate 'dx-db-connector' project, but the malicious code is not part of that upstream. Any invocation of the malicious method results in execution of attacker-controlled code with the privileges of the Node.js process.
Potential Impact
Any system that installs and runs 'db-query-log' version 1.0.1 and triggers the malicious code path is fully compromised. Attackers can execute arbitrary code remotely with the privileges of the Node.js process, potentially leading to complete system takeover, data theft, and further malware deployment. All secrets and keys stored on the compromised system should be considered exposed and must be rotated. Removal of the package alone does not guarantee eradication of all malicious artifacts due to the potential for persistent compromise.
Mitigation Recommendations
No official patch or fix is currently available for this malicious package. Immediate removal of 'db-query-log' version 1.0.1 from all systems is required. Treat any system with this package installed as fully compromised. Rotate all secrets and credentials from a secure, unaffected environment. Conduct a thorough incident response to identify and remediate any persistent backdoors or malware resulting from this compromise.
Malicious code in db-query-log (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (4928f7d380b79104d997e7666603726873158508c38d2c75a90c7529dd196be3) The package presents itself as a database query helper but index.js defines a method queryDBConnect() that base64-decodes a hardcoded URL pointing to https://www.jsonkeeper.com/b/ZIAIK (an anonymous, attacker-mutable JSON paste host), fetches the.data.content field via axios, and compiles and executes the response as a Node module via new Module()._compile(...). The destination URL is stored as a base64 literal named HASH_KEY and decoded with atob() at runtime, hiding it from static inspection, and errors in the fetch-and-execute path are silently swallowed. Package metadata further misrepresents the project: package.json declares the name 'db-query-log' while repository/homepage/bugs all point to github.com/divbloxjs/dx-db-connector and the exported class is DivbloxDatabaseConnector, with the remote-exec method absent from that upstream's API. Any consumer that calls into the package's connector and reaches this code path will execute arbitrary attacker-controlled JavaScript inside the Node.js process with the installer's privileges. ## Source: ghsa-malware (a5d245a2e918e8af41a64a320689397803dea5a0d84fc792f900fa8995e3f589) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
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 pointing to an attacker-controlled JSON paste service. It fetches the content field from this URL using axios, then compiles and executes the fetched JavaScript code within the Node.js process using new Module().compile(), effectively allowing remote code execution. The malicious URL is obfuscated via base64 encoding and decoded at runtime to evade static detection. Package metadata falsely claims association with the legitimate 'dx-db-connector' project, but the malicious code is not part of that upstream. Any invocation of the malicious method results in execution of attacker-controlled code with the privileges of the Node.js process.
Potential Impact
Any system that installs and runs 'db-query-log' version 1.0.1 and triggers the malicious code path is fully compromised. Attackers can execute arbitrary code remotely with the privileges of the Node.js process, potentially leading to complete system takeover, data theft, and further malware deployment. All secrets and keys stored on the compromised system should be considered exposed and must be rotated. Removal of the package alone does not guarantee eradication of all malicious artifacts due to the potential for persistent compromise.
Mitigation Recommendations
No official patch or fix is currently available for this malicious package. Immediate removal of 'db-query-log' version 1.0.1 from all systems is required. Treat any system with this package installed as fully compromised. Rotate all secrets and credentials from a secure, unaffected environment. Conduct a thorough incident response to identify and remediate any persistent backdoors or malware resulting from this compromise.
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"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a4c345127e9c797195fcf67
Added to database: 07/06/2026, 23:03:45 UTC
Last enriched: 07/06/2026, 23:37:58 UTC
Last updated: 07/27/2026, 16:36:01 UTC
Views: 19
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.