Intel

AIKIDO-2026-11126

sqlite3 is vulnerable to Use After Free

Use After FreeGHSA-j7fr-3v8c-3qc3 Published 2 days ago

37

Low Risk

This Affects:

RUBYsqlite3
2.1.0 - 2.9.4
Fixed in 2.9.5
Are you affected? Scan for Free

TL;DR

The sqlite3 Ruby gem wires aggregate function callbacks from Ruby into SQLite through the native extension. If a prepared statement that calls a user-defined aggregate is stepped after the database is soft-closed, SQLite may invoke callback objects that were released when the database cleared its aggregator references, and garbage collection can cause an invalid memory read and segmentation fault. Applications that keep statements open across close while using create_aggregate, create_aggregate_handler, or define_aggregator can crash. Version 2.9.5 stops clearing aggregator references on close so callbacks remain valid for open statements.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

sqlite3 is vulnerable to Use After Free in versions 2.1.0 - 2.9.4.

How to fix this

Upgrade the sqlite3 and/or the sqlite3-ruby library to the patch version.