Skip to main content

Malicious code in db-query-log (npm)

0
Critical
Published: 06/26/2026 (06/26/2026, 21:19:18 UTC)
Source: GCVE Database
Product: db-query-log

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

npmghsa
db-query-log
Affected versions
=1.0.1

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

AILast updated: 08/20/2026, 16:59:16 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses