# CVE-2026-58041: Race condition in node

> A race condition in Node.js SQLite allows stale iterators to execute cached statements with new parameters, potentially leading to unauthorized data access or modification.

- **Severity:** Medium 5.3 (`CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 4 Aug 2026
- **Updated:** 4 Aug 2026
- **Also known as:** ALPINE-CVE-2026-58041, BELL-CVE-2026-58041, BIT-node-2026-58041, BIT-node-min-2026-58041, CLEANSTART-2026-HA97682, DEBIAN-CVE-2026-58041, ECHO-d3a5-74f9-2a46, GHSA-qgrj-5wc5-7xvc, MINI-76ph-qpv7-4x9p, MINI-9p75-9jv7-64j6, MINI-9prm-2frv-g42h, MINI-c9mc-v72f-jmv9, MINI-f2qj-jxfq-vrjc, MINI-mhjp-q2p7-hf2m, MINI-qmc4-jq7j-hfq9, MINI-v4h9-96pw-798m, UBUNTU-CVE-2026-58041

## What is CVE-2026-58041?

CVE-2026-58041 is a medium-severity vulnerability in nodejs node, published on 4 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

A flaw in Node.js node:sqlite allows a stale StatementSyncIterator created through DatabaseSync#createTagStore() to continue executing a cached prepared statement after it has been reset and rebound with new parameters. SQLTagStore resets cached statements using sqlite3_reset() directly, bypassing the iterator invalidation mechanism introduced for StatementSync in recent releases

This vulnerability affects Node.js **22.x**, **24.x**, and **26.x**.

Weakness: CWE-367 (Time-of-check Time-of-use (TOCTOU) Race Condition)

## Which versions are affected by CVE-2026-58041?

2 open source packages ship an affected version, including node and node-min.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `node` | Bitnami | All versions | 22.23.2, 24.18.1, 26.5.1 |
| `node-min` | Bitnami | All versions | 22.23.2, 24.18.1, 26.5.1 |

## How do I fix CVE-2026-58041?

Upgrade node to a fixed version for your release line: 22.23.2, 24.18.1 or 26.5.1.

## Is CVE-2026-58041 being exploited?

There is no known exploitation of CVE-2026-58041 in the wild and no public exploit code.

Public exploit code:

- Offline Node.js evidence checker for CVE-2026-58041: SQLite cached iterator write replay. Single-file Python; JSON/CSV/HTML reports; no exploit payloads. (github_poc): https://github.com/CompleteTech-Security/node-cve-2026-58041-check

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-58041 and fix it if it is affected.

What it is: CVE-2026-58041 is a medium-severity vulnerability in nodejs node, published on 4 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-58041 in the wild and no public exploit code.

Affected packages and fixed versions:
- node (Bitnami): affected all versions; fixed in 22.23.2, 24.18.1, 26.5.1
- node-min (Bitnami): affected all versions; fixed in 22.23.2, 24.18.1, 26.5.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-58041/ (Markdown: https://insights.sbomify.com/CVE-2026-58041/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-58041
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-58041
- OSV: https://osv.dev/vulnerability/CVE-2026-58041

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-58041/
Summaries are generated and may contain mistakes; the official description above is the record.
