CVE-2026-54620
sqlite3-ruby has Use-After-Free in SQLite Aggregate Function Callbacks
sqlite3 provides Ruby bindings for the SQLite3 embedded database. From 2.1.0 to 2.9.4, the callbacks used for SQLite aggregate functions can be freed while still referenced during aggregation, resulting in a use-after-free. This issue is fixed in version 2.9.5.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- High
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
2.0
sqlite3-ruby has Use-After-Free in SQLite Aggregate Function Callbacks
sqlite3 provides Ruby bindings for the SQLite3 embedded database. From 2.1.0 to 2.9.4, the callbacks used for SQLite aggregate functions can be freed while still referenced during aggregation, resulting in a use-after-free. This issue is fixed in version 2.9.5.
- Record
CVE-2026-54620- CVSS 4.0
- 2.0 Low
CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N - Weakness
- CWE-416
- Updated
- 2026-11-02
EUVDEUVD-2026-49899
2.0
sqlite3 provides Ruby bindings for the SQLite3 embedded database. From 2.1.0 to 2.9.4, the callbacks used for SQLite aggregate functions can be freed while still referenced during aggregation, resulting in a use-after-free. This issue is fixed in version 2.9.5.
- Record
EUVD-2026-49899- CVSS 4.0
- 2.0 Low
CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-j7fr-3v8c-3qc3
2.0
sqlite3-ruby has Use-After-Free in SQLite Aggregate Function Callbacks
Summary
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.
Mitigation
Upgrade to sqlite3 gem v2.9.5 or later.
As a workaround, avoid using an aggregate function after closing the database.
Severity
The sqlite3-ruby maintainers assess this as Low severity. It is reliably triggered after GC when code is structured in a particular way. There is no known general exploit that could be used as a denial of service attack.
- Record
GHSA-j7fr-3v8c-3qc3- CVSS 4.0
- 2.0 Low
CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N - Weakness
- CWE-416
- Updated
- 2026-11-02
NVD
2.0
sqlite3 provides Ruby bindings for the SQLite3 embedded database. From 2.1.0 to 2.9.4, the callbacks used for SQLite aggregate functions can be freed while still referenced during aggregation, resulting in a use-after-free. This issue is fixed in version 2.9.5.
- Record
CVE-2026-54620- CVSS 4.0
- 2.0 Low
CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Weakness
- CWE-416
- Updated
- 2026-11-02
OSV
2.0
sqlite3-ruby has Use-After-Free in SQLite Aggregate Function Callbacks
sqlite3 provides Ruby bindings for the SQLite3 embedded database. From 2.1.0 to 2.9.4, the callbacks used for SQLite aggregate functions can be freed while still referenced during aggregation, resulting in a use-after-free. This issue is fixed in version 2.9.5.
- Record
CVE-2026-54620- CVSS 4.0
- 2.0 Low
CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N - Weakness
- CWE-416
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-54620
2.0
sqlite3 provides Ruby bindings for the SQLite3 embedded database. From 2.1.0 to 2.9.4, the callbacks used for SQLite aggregate functions can be freed while still referenced during aggregation, resulting in a use-after-free. This issue is fixed in version 2.9.5.
- Record
DEBIAN-CVE-2026-54620- CVSS 4.0
- 2.0 Low
CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Updated
- 2026-11-02
OSVGHSA-j7fr-3v8c-3qc3
2.0
sqlite3-ruby has Use-After-Free in SQLite Aggregate Function Callbacks
Summary
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.
Mitigation
Upgrade to sqlite3 gem v2.9.5 or later.
As a workaround, avoid using an aggregate function after closing the database.
Severity
The sqlite3-ruby maintainers assess this as Low severity. It is reliably triggered after GC when code is structured in a particular way. There is no known general exploit that could be used as a denial of service attack.
- Record
GHSA-j7fr-3v8c-3qc3- CVSS 4.0
- 2.0 Low
CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N - Weakness
- CWE-416
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-54620
2.0
sqlite3 provides Ruby bindings for the SQLite3 embedded database. From 2.1.0 to 2.9.4, the callbacks used for SQLite aggregate functions can be freed while still referenced during aggregation, resulting in a use-after-free. This issue is fixed in version 2.9.5.
- Record
UBUNTU-CVE-2026-54620- CVSS 4.0
- 2.0 Low
CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
sqlite3-rubyRubyGems |
2.1.0 to 2.9.4 | 2.9.5 |
sqlite3RubyGems |
2.1.0 to 2.9.4 | 2.9.5 |
ruby-sqlite3Debian:12 |
All versions, plus listed versions 1.4.2-41.6.9-11.6.9-21.7.3-11.7.3-2 Show 8 moreShow less2.10.0-1~exp12.9.0-12.9.1-12.9.3-12.9.5-12.9.5-22.9.6-12.9.6-2 |
None known |
ruby-sqlite3Debian:13 |
All versions, plus listed versions 1.7.3-11.7.3-22.10.0-1~exp12.9.0-12.9.1-1 Show 5 moreShow less2.9.3-12.9.5-12.9.5-22.9.6-12.9.6-2 |
None known |
ruby-sqlite3Debian:14 |
before 2.9.5-1, plus listed versions 1.7.3-11.7.3-22.9.0-12.9.1-12.9.3-1 |
2.9.5-1 |
sqlite3-rubyRubyGems |
2.1.0 up to 2.9.5 | 2.9.5 |
sqlite3RubyGems |
2.1.0 up to 2.9.5, plus listed versions 2.1.12.2.02.3.02.3.12.4.0 Show 17 moreShow less2.4.12.5.02.5.0.rc12.6.02.7.02.7.12.7.22.7.32.7.42.8.02.8.12.9.02.9.12.9.22.9.2.rc22.9.32.9.4 |
2.9.5 |
ruby-sqlite3Ubuntu:16.04:LTS |
All versions, plus listed versions 1.3.10-11.3.11-11.3.11-1build11.3.11-21.3.11-2build1 |
None known |
ruby-sqlite3Ubuntu:18.04:LTS |
All versions, plus listed versions 1.3.13-11.3.13-1build11.3.13-1build2 |
None known |
ruby-sqlite3Ubuntu:20.04:LTS |
All versions, plus listed versions 1.3.13-1build21.4.2-2build1 |
None known |
Show 4 moreShow less
| Package | Affected | Fixed |
|---|---|---|
ruby-sqlite3Ubuntu:22.04:LTS |
All versions, plus listed versions 1.4.2-31.4.2-3build11.4.2-4 |
None known |
ruby-sqlite3Ubuntu:24.04:LTS |
All versions, plus listed versions 1.4.2-4build21.4.2-4build31.4.2-4build4 |
None known |
ruby-sqlite3Ubuntu:26.10 |
All versions, plus listed versions 1.7.3-22.9.5-2 |
None known |
ruby-sqlite3Ubuntu:26.04:LTS |
All versions, plus listed versions 1.7.3-11.7.3-2 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-54620 is a low vulnerability (CVSS 2.0) in Sparklemotion Sqlite3-ruby, published July 28, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.14%, the 3rd percentile. Fixed in sqlite3-ruby 2.9.5.
References
github.com/sparklemotion/sqlite3-ruby/security/advisories/GHSA-j7fr-3v8c-3qc3
github.com/sparklemotion/sqlite3-ruby/pull/711
github.com/sparklemotion/sqlite3-ruby/commit/b24e1e6076528b7f95f99acf7a81c70d0004c726
github.com/sparklemotion/sqlite3-ruby/releases/tag/v2.9.5
github.com/rubysec/ruby-advisory-db/blob/master/gems/sqlite3/CVE-2026-54620.yml
cve.org/CVERecord/SearchResults?query=CVE-2026-54620
Show 7 moreShow less
github.com/advisories/GHSA-j7fr-3v8c-3qc3
github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54620.json
nvd.nist.gov/vuln/detail/CVE-2026-54620
security-tracker.debian.org/tracker/CVE-2026-54620
github.com/sparklemotion/sqlite3-ruby
ubuntu.com/security/CVE-2026-54620
cve.org/CVERecord?id=CVE-2026-54620