{"id":"GHSA-28hh-pr2h-2w89","summary":"sqlite3-ruby has Use-After-Free When Redefining SQLite Functions with Different Arity","details":"## Summary\n\nUsing `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.\n\n## Mitigation\n\nUpgrade to sqlite3 gem v2.9.5 or later.\n\nAs a workaround, avoid defining multiple custom functions with the same name (varying numbers of arguments or encoding).\n\n## Severity\n\nThe 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.","aliases":["CVE-2026-54619"],"modified":"2026-07-28T16:35:58.822345Z","published":"2026-07-28T16:21:31Z","database_specific":{"cwe_ids":["CWE-416"],"severity":"LOW","github_reviewed":true,"github_reviewed_at":"2026-07-28T16:21:31Z","nvd_published_at":null},"references":[{"type":"WEB","url":"https://github.com/sparklemotion/sqlite3-ruby/security/advisories/GHSA-28hh-pr2h-2w89"},{"type":"WEB","url":"https://github.com/sparklemotion/sqlite3-ruby/pull/710"},{"type":"WEB","url":"https://github.com/sparklemotion/sqlite3-ruby/commit/2bd436d17f77cdd4c31b00fe9d50b0d21cbaf033"},{"type":"WEB","url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sqlite3/CVE-2026-54619.yml"},{"type":"PACKAGE","url":"https://github.com/sparklemotion/sqlite3-ruby"},{"type":"WEB","url":"https://github.com/sparklemotion/sqlite3-ruby/releases/tag/v2.9.5"},{"type":"WEB","url":"https://www.cve.org/CVERecord/SearchResults?query=CVE-2026-54619"}],"affected":[{"package":{"name":"sqlite3-ruby","ecosystem":"RubyGems","purl":"pkg:gem/sqlite3-ruby"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.9.5"}]}],"versions":["0.5.0","0.6.0","0.9.0","1.0.0","1.0.1","1.1.0","1.2.0","1.2.1","1.2.2","1.2.3","1.2.4","1.2.5","1.3.0","1.3.0.beta.1","1.3.0.beta.2","1.3.1","1.3.2","1.3.3","1.3.3.beta.1"],"database_specific":{"last_known_affected_version_range":"\u003c= 2.9.4","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-28hh-pr2h-2w89/GHSA-28hh-pr2h-2w89.json"}},{"package":{"name":"sqlite3","ecosystem":"RubyGems","purl":"pkg:gem/sqlite3"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.9.5"}]}],"versions":["0.0.0","0.0.1","0.0.2","0.0.3","0.0.4","0.0.5","0.0.6","0.0.7","0.0.8","0.1.0","0.1.1","1.3.10","1.3.11","1.3.12","1.3.13","1.3.3","1.3.3.beta.1","1.3.4","1.3.5","1.3.6","1.3.7","1.3.8","1.3.9","1.4.0","1.4.1","1.4.2","1.4.3","1.4.4","1.5.0","1.5.0.rc1","1.5.0.rc2","1.5.1","1.5.2","1.5.3","1.5.4","1.6.0","1.6.0.rc1","1.6.0.rc2","1.6.1","1.6.2","1.6.3","1.6.4","1.6.5","1.6.5.rc1","1.6.6","1.6.7","1.6.8","1.6.9","1.7.0","1.7.1","1.7.2","1.7.3","2.0.0","2.0.1","2.0.2","2.0.3","2.0.4","2.1.0","2.1.0.rc1","2.1.0.rc2","2.1.0.rc3","2.1.1","2.2.0","2.3.0","2.3.1","2.4.0","2.4.1","2.5.0","2.5.0.rc1","2.6.0","2.7.0","2.7.1","2.7.2","2.7.3","2.7.4","2.8.0","2.8.1","2.9.0","2.9.1","2.9.2","2.9.2.rc2","2.9.3","2.9.4"],"database_specific":{"last_known_affected_version_range":"\u003c= 2.9.4","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-28hh-pr2h-2w89/GHSA-28hh-pr2h-2w89.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}