CVE-2026-54620: sqlite3-ruby has Use-After-Free in SQLite Aggregate Function Callbacks
Using Database#create_aggregate, #create_aggregate_handler, or Database#define_aggregator to define an aggregate function, and then using an open statement calling that function after the database has been explicitly closed will result in an invalid memory read and a segmentation fault.
References
- github.com/advisories/GHSA-j7fr-3v8c-3qc3
- github.com/rubysec/ruby-advisory-db/blob/master/gems/sqlite3/CVE-2026-54620.yml
- github.com/sparklemotion/sqlite3-ruby/commit/b24e1e6076528b7f95f99acf7a81c70d0004c726
- github.com/sparklemotion/sqlite3-ruby/pull/711
- github.com/sparklemotion/sqlite3-ruby/releases/tag/v2.9.5
- github.com/sparklemotion/sqlite3-ruby/security/advisories/GHSA-j7fr-3v8c-3qc3
- nvd.nist.gov/vuln/detail/CVE-2026-54620
- www.cve.org/CVERecord/SearchResults?query=CVE-2026-54620
Code Behaviors & Features
Detect and mitigate CVE-2026-54620 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →