Skip to main content

Nodejs: A flaw in Node.js node:sqlite allows a stale StatementSyncIterator created through DatabaseSync#createTagStore() to continue executing a cached… (CVE-2026-58041)

0
Medium
Published: 08/04/2026 (08/04/2026, 01:16:00 UTC)
Source: GCVE Database
Product: nodejs

Description

A vulnerability in Node.js node:sqlite allows a stale StatementSyncIterator created via DatabaseSync#createTagStore() to continue executing a cached prepared statement after it has been reset and rebound with new parameters. This occurs because SQLTagStore resets cached statements using sqlite3_reset() directly, bypassing the iterator invalidation mechanism introduced in recent releases. This flaw affects Node.js versions 22.x, 24.x, and 26.x. The vulnerability has a medium severity with a CVSS score of 5.3.

CVSS v3.0

Score 5.3medium

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N

Affected software

Ubuntu:Pro:14.04:LTSmore threats →ghsa
nodejs
pkg:deb/ubuntu/nodejs?arch=source&distro=esm-infra-legacy/trusty
Affected versions
=0.10.15~dfsg1-4=0.10.21~dfsg1-1=0.10.22~dfsg1-2=0.10.23~dfsg1-1=0.10.23~dfsg1-2=0.10.23~dfsg1-3=0.10.24~dfsg1-1=0.10.25~dfsg2-2=0.10.25~dfsg2-2ubuntu1=0.10.25~dfsg2-2ubuntu1.2=0.10.25~dfsg2-2ubuntu1.2+esm1=0.10.25~dfsg2-2ubuntu1.2+esm2
Ubuntu:Pro:16.04:LTSmore threats →ghsa
nodejs
pkg:deb/ubuntu/nodejs?arch=source&distro=esm-apps/xenial
Affected versions
=0.10.25~dfsg2-2ubuntu1=4.2.2~dfsg-1=4.2.3~dfsg-1=4.2.4~dfsg-1ubuntu1=4.2.4~dfsg-2=4.2.6~dfsg-1ubuntu1=4.2.6~dfsg-1ubuntu4=4.2.6~dfsg-1ubuntu4.1=4.2.6~dfsg-1ubuntu4.2=4.2.6~dfsg-1ubuntu4.2+esm1=4.2.6~dfsg-1ubuntu4.2+esm2=4.2.6~dfsg-1ubuntu4.2+esm3
Ubuntu:Pro:18.04:LTSmore threats →ghsa
nodejs
pkg:deb/ubuntu/nodejs?arch=source&distro=esm-apps/bionic
Affected versions
=6.11.4~dfsg-1ubuntu1=6.11.4~dfsg-1ubuntu2=6.12.0~dfsg-1ubuntu1=6.12.0~dfsg-2ubuntu1=6.12.0~dfsg-2ubuntu2=8.10.0~dfsg-2=8.10.0~dfsg-2ubuntu0.2=8.10.0~dfsg-2ubuntu0.3=8.10.0~dfsg-2ubuntu0.4=8.10.0~dfsg-2ubuntu0.4+esm1=8.10.0~dfsg-2ubuntu0.4+esm2=8.10.0~dfsg-2ubuntu0.4+esm3=8.10.0~dfsg-2ubuntu0.4+esm4=8.10.0~dfsg-2ubuntu0.4+esm5=8.10.0~dfsg-2ubuntu0.4+esm6
Ubuntu:Pro:20.04:LTSmore threats →ghsa
nodejs
pkg:deb/ubuntu/nodejs?arch=source&distro=esm-apps/focal
Affected versions
=10.15.2~dfsg-2ubuntu1=10.17.0~dfsg-2ubuntu4=10.17.0~dfsg-2ubuntu6=10.19.0~dfsg-3ubuntu1=10.19.0~dfsg-3ubuntu1.1=10.19.0~dfsg-3ubuntu1.2=10.19.0~dfsg-3ubuntu1.3=10.19.0~dfsg-3ubuntu1.5=10.19.0~dfsg-3ubuntu1.6=10.19.0~dfsg-3ubuntu1.6+esm2
Ubuntu:Pro:22.04:LTSmore threats →ghsa
nodejs
pkg:deb/ubuntu/nodejs?arch=source&distro=esm-apps/jammy
Affected versions
=12.22.5~dfsg-5ubuntu1=12.22.7~dfsg-2ubuntu1=12.22.7~dfsg-2ubuntu3=12.22.9~dfsg-1ubuntu2=12.22.9~dfsg-1ubuntu3=12.22.9~dfsg-1ubuntu3.1=12.22.9~dfsg-1ubuntu3.2=12.22.9~dfsg-1ubuntu3.3=12.22.9~dfsg-1ubuntu3.4=12.22.9~dfsg-1ubuntu3.5=12.22.9~dfsg-1ubuntu3.6=12.22.9~dfsg-1ubuntu3.6+esm2
Ubuntu:24.04:LTSmore threats →ghsa
nodejs
pkg:deb/ubuntu/nodejs?arch=source&distro=noble
Affected versions
=18.13.0+dfsg1-1ubuntu2=18.19.1+dfsg-2ubuntu4=18.19.1+dfsg-6ubuntu1=18.19.1+dfsg-6ubuntu2=18.19.1+dfsg-6ubuntu5
Ubuntu:26.10more threats →ghsa
nodejs
pkg:deb/ubuntu/nodejs?arch=source&distro=stonking
Affected versions
=22.22.1+dfsg+~cs22.19.15-1ubuntu1=24.16.0+dfsg+~cs24.13.1-2ubuntu1=24.18.0+dfsg+~cs24.13.2-1ubuntu1=24.19.0+dfsg+~cs24.13.3-1ubuntu1
Ubuntu:26.04:LTSmore threats →ghsa
nodejs
pkg:deb/ubuntu/nodejs?arch=source&distro=resolute
Affected versions
=20.19.4+dfsg-1=20.19.5+dfsg+~cs20.19.12-4=22.21.1+dfsg+~cs22.19.0-6ubuntu4=22.22.0+dfsg+~cs22.19.6-1ubuntu2=22.22.0+dfsg+~cs22.19.13-2ubuntu1=22.22.1+dfsg+~cs22.19.15-1ubuntu1

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: 10/18/2026, 00:32:48 UTC

Technical Analysis

The vulnerability in Node.js node:sqlite involves the improper handling of cached prepared statements within the StatementSyncIterator created through DatabaseSync#createTagStore(). Specifically, after a cached statement is reset and rebound with new parameters, the stale StatementSyncIterator can continue executing it because SQLTagStore uses sqlite3_reset() directly, which bypasses the iterator invalidation mechanism introduced for StatementSync in recent Node.js releases. This flaw affects Node.js versions 22.x, 24.x, and 26.x and may lead to unintended execution of SQL statements with potentially altered parameters.

Potential Impact

The vulnerability allows a stale StatementSyncIterator to execute cached prepared statements after they have been reset and rebound, which could lead to unintended or incorrect SQL statement execution. According to the CVSS vector, the impact is limited to integrity (I:H) with no confidentiality or availability impact. The attack complexity is high, no privileges are required, and user interaction is required, indicating a medium severity level.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided in the available data. Users should monitor official Node.js security advisories for updates and apply patches once available. Until then, cautious use of the affected API and avoiding scenarios that could trigger this flaw may reduce risk.

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
UBUNTU-CVE-2026-58041
Osv Schema Version
1.7.0
Ecosystems
["Ubuntu:Pro:14.04:LTS","Ubuntu:Pro:16.04:LTS","Ubuntu:Pro:18.04:LTS","Ubuntu:Pro:20.04:LTS","Ubuntu:Pro:22.04:LTS","Ubuntu:24.04:LTS","Ubuntu:26.10","Ubuntu:26.04:LTS"]
Cvss Version
3.0
State
PUBLISHED

Threat ID: 6ad3f5de2cdf04f656663473

Added to database: 10/17/2026, 22:25:34 UTC

Last enriched: 10/18/2026, 00:32:48 UTC

Last updated: 10/18/2026, 00:32:48 UTC

Views: 2

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