2.0low
sqlite3-ruby has Use-After-Free When Redefining SQLite Functions with Different Arity
- Severity
- 2.0low CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.11% (higher than 1% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-28hh-pr2h-2w89
Description
sqlite3 provides Ruby bindings for the SQLite3 embedded database. In version 2.9.4 and earlier, redefining a SQLite function with a different arity frees the previously registered function handler while SQLite may still reference it, resulting in a use-after-free. This issue is fixed in version 2.9.5.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| sparklemotion sqlite3-ruby | < 2.9.5 | CVE List |
| sqlite3-ruby (RubyGems) | before 2.9.5 | GitHub Advisory Database |
| sqlite3 (RubyGems) | before 2.9.5 | GitHub Advisory Database |
All scores
| GitHub_M | 2.0low CVSS:4.0 | 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 |
| GitHub | low CVSS:4.0 | 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 |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
sqlite3 provides Ruby bindings for the SQLite3 embedded database. In version 2.9.4 and earlier, redefining a SQLite function with a different arity frees the previously registered function handler while SQLite may still reference it, resulting in a use-after-free. This issue is fixed in version 2.9.5.
GitHub Advisory Database
Summary
Using Database#create_function or Database#define_function to define the same function name more than once with different numbers of arguments ("arity") or text encodings will result in a invalid memory read and a segmentation fault.
Mitigation
Upgrade to sqlite3 gem v2.9.5 or later.
As a workaround, avoid defining multiple custom functions with the same name (varying numbers of arguments or encoding).
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.
NVD (es)
sqlite3 proporciona enlaces Ruby para la base de datos incrustada SQLite3. En la versión 2.9.4 y anteriores, redefinir una función SQLite con una aridad diferente libera el gestor de función previamente registrado mientras SQLite aún puede referenciarlo, lo que resulta en un uso después de liberación. Este problema está solucionado en la versión 2.9.5.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-54619 changed 2026-07-28 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-28hh-pr2h-2w89 changed 2026-07-28 | CC-BY-4.0 |
| NVD | CVE-2026-54619 changed 2026-10-23 | Public domain |