Nodejs: A flaw in Node.js node:sqlite allows a stale StatementSyncIterator created through DatabaseSync#createTagStore() to continue executing a cached… (CVE-2026-58041)
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
Affected software
pkg:deb/ubuntu/nodejs?arch=source&distro=esm-infra-legacy/trustypkg:deb/ubuntu/nodejs?arch=source&distro=esm-apps/xenialpkg:deb/ubuntu/nodejs?arch=source&distro=esm-apps/bionicpkg:deb/ubuntu/nodejs?arch=source&distro=esm-apps/focalpkg:deb/ubuntu/nodejs?arch=source&distro=esm-apps/jammypkg:deb/ubuntu/nodejs?arch=source&distro=noblepkg:deb/ubuntu/nodejs?arch=source&distro=stonkingpkg:deb/ubuntu/nodejs?arch=source&distro=resoluteRun 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 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.
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 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.