CVE-2026-58041: CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition in nodejs node
CVE-2026-58041 is a medium severity vulnerability in Node.js affecting versions 22.x, 24.x, and 26.x. It involves a time-of-check to time-of-use (TOCTOU) race condition in the node:sqlite module, where a stale StatementSyncIterator can 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.
AI Analysis
Technical Summary
This vulnerability in Node.js node:sqlite allows a stale StatementSyncIterator created via DatabaseSync#createTagStore() to execute a cached prepared statement even after the statement has been reset and rebound with new parameters. The root cause is that SQLTagStore uses sqlite3_reset() directly to reset cached statements, which bypasses the iterator invalidation mechanism designed for StatementSync objects. This TOCTOU race condition could lead to inconsistent or unintended SQL statement execution. The issue affects Node.js versions 22.x, 24.x, and 26.x, specifically versions 22.23.1, 24.18.0, and 26.5.0 as stated.
Potential Impact
The vulnerability could allow an attacker to cause a cached prepared SQL statement to execute with stale or unintended parameters, potentially leading to incorrect application behavior or data integrity issues. The CVSS score of 5.3 (medium severity) reflects that the impact is limited to integrity with no confidentiality or availability impact. Exploitation requires network access with high attack complexity and user interaction, and no privileges are required.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary workaround is indicated in the provided data. Users should monitor Node.js vendor advisories for updates addressing this issue. Until a fix is available, cautious use of the affected node:sqlite functionality is advised.
CVE-2026-58041: CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition in nodejs node
Description
CVE-2026-58041 is a medium severity vulnerability in Node.js affecting versions 22.x, 24.x, and 26.x. It involves a time-of-check to time-of-use (TOCTOU) race condition in the node:sqlite module, where a stale StatementSyncIterator can 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.
CVSS v3.0
Score 5.3medium
Affected software
nodejs
node
pkg:github/nodejs/nodeRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability in Node.js node:sqlite allows a stale StatementSyncIterator created via DatabaseSync#createTagStore() to execute a cached prepared statement even after the statement has been reset and rebound with new parameters. The root cause is that SQLTagStore uses sqlite3_reset() directly to reset cached statements, which bypasses the iterator invalidation mechanism designed for StatementSync objects. This TOCTOU race condition could lead to inconsistent or unintended SQL statement execution. The issue affects Node.js versions 22.x, 24.x, and 26.x, specifically versions 22.23.1, 24.18.0, and 26.5.0 as stated.
Potential Impact
The vulnerability could allow an attacker to cause a cached prepared SQL statement to execute with stale or unintended parameters, potentially leading to incorrect application behavior or data integrity issues. The CVSS score of 5.3 (medium severity) reflects that the impact is limited to integrity with no confidentiality or availability impact. Exploitation requires network access with high attack complexity and user interaction, and no privileges are required.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary workaround is indicated in the provided data. Users should monitor Node.js vendor advisories for updates addressing this issue. Until a fix is available, cautious use of the affected node:sqlite functionality is advised.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- hackerone
- Date Reserved
- 2026-06-27T15:00:00.780Z
- Cvss Version
- 3.0
- State
- PUBLISHED
Threat ID: 6a713a63bf32cb7a3480a4d2
Added to database: 08/04/2026, 01:03:31 UTC
Last enriched: 08/11/2026, 18:27:47 UTC
Last updated: 09/17/2026, 22:01:36 UTC
Views: 80
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.