Skip to content
Race condition Disclosed report Advanced CVE-2026-58041

node:sqlite SQLTagStore Iterator Replay Lets Attacker Re-Execute Victim-Bound Writes Indefinitely

A stale iterator from node:sqlite's tag store can keep running a cached prepared statement after it has been reset and rebound with new parameters.

cantina-security Follow

Originally disclosed on HackerOne

Medium 5.3 View original
  • Triaged in 5 days
  • Fixed in 48 days
  • Disclosed after 3 months

Summary by the program

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.

The original report as published on HackerOne, by cantina-security. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the tag store resets cached statements with sqlite3_reset() directly, skipping the iterator invalidation that StatementSync performs.

What the attacker needed

Use of node:sqlite tag store; a stale iterator is retained

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Node.js has a built-in database feature called node:sqlite. It keeps prepared statements (pre-written database commands) in a cache and reuses them. The bug is that an old handle to one of those cached commands is not invalidated when the command is reset and given new values, so the old handle can still run it with whatever values are currently bound.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More by cantina-security

View all

2 more disclosed reports, best first.

More from Node.js

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.