Skip to main content
EPSS 0.3%top 83%

CVE-2026-58041: CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition in nodejs node

0
Medium
VulnerabilityCVE-2026-58041cvecve-2026-58041cwe-367
Published: 08/04/2026 (08/04/2026, 00:49:58 UTC)
Source: CVE Database V5
Vendor/Project: nodejs
Product: 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

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

nodejs

node

Affected versions
>=22.23.1 <=22.23.1>=24.18.0 <=24.18.0>=26.5.0 <=26.5.0
GitHub Actionsmore threats →ai
nodejs/node
pkg:github/nodejs/node
Affected versions
=22.23.1=24.18.0=26.5.0

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/11/2026, 18:27:47 UTC

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.

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

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 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