Use After Free Affecting sqlite3 package, versions >=1.4.0, <2.9.6


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUBY-SQLITE3-18857930
  • published16 Aug 2026
  • disclosed13 Aug 2026
  • creditjeremy

Introduced: 13 Aug 2026

New CVE NOT AVAILABLE CWE-416  (opens in a new tab)

How to fix?

Upgrade sqlite3 to version 2.9.6 or higher.

Overview

Affected versions of this package are vulnerable to Use After Free in rb_sqlite3_aggregator_step in ext/sqlite3/aggregator.c. An attacker can make the aggregate step method receive a wrong or freed Ruby object, or crash the process, by invoking a multi-argument aggregate over attacker-controlled TEXT or BLOB values while garbage collection runs during argument conversion. The flaw affects Database#create_aggregate, #create_aggregate_handler, and Database#define_aggregator when the aggregate takes two or more arguments. Ordinary GC during conversion of a later argument can collect a Ruby object already stored for an earlier argument, so applications using such aggregates can see corrupted results or a segmentation fault.

CVSS Base Scores

version 4.0
version 3.1