CVE-2026-54620
NoneCVSS
—
EPSS
0.1%
Published
Jul 28, 2026
CISA due date
—
Cloudanix analysis
Some Ruby applications using SQLite can crash if they process specially triggered database aggregation behavior, so the SQLite Ruby package should be updated.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- High
- Impact
- Denial Of Service
- Component
- Library
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
This is a use-after-free vulnerability in the Ruby sqlite3 bindings affecting versions 2.1.0 through 2.9.4. The flaw occurs in callback handling for SQLite aggregate functions: callback objects can be freed while SQLite aggregation logic still holds references to them. If triggered, Ruby code using affected sqlite3 versions can access invalid memory, leading to process crashes and potentially memory corruption. Based on the provided scoring, exploitation is local, requires low privileges, has high complexity, and is expected to have limited confidentiality, integrity, and availability impact rather than straightforward remote code execution.
Why it matters to the business
Applications or jobs that use vulnerable Ruby sqlite3 versions may crash or behave unpredictably when processing crafted or attacker-influenced aggregate-function activity. The most likely operational impact is service instability, failed background jobs, application errors, or denial of service in systems that rely on SQLite through the Ruby sqlite3 gem. Public exploitation is not currently indicated, EPSS is very low, and the issue is not listed in CISA KEV, so urgency is lower than for actively exploited internet-facing vulnerabilities; however, affected packages should still be upgraded because memory-safety flaws can become more serious if reliable exploitation techniques emerge.
How an attack unfolds
An attacker first needs some level of local or application-level influence over a Ruby process that uses the vulnerable sqlite3 gem. The vulnerable code path involves SQLite aggregate functions registered through Ruby callbacks. The attacker attempts to cause aggregate execution in a way that results in the callback object being freed while aggregation still references it. Subsequent use of the stale callback reference can corrupt memory or crash the Ruby process. In realistic scenarios, exploitation is most plausible where untrusted users can influence SQL execution, extension behavior, custom aggregate functions, or application workflows that invoke SQLite aggregate callbacks. There is no indication from the supplied data that public weaponized exploits or ransomware campaigns are using this vulnerability.
How to fix it
Upgrade the Ruby sqlite3 gem to version 2.9.5 or later. If dependency management uses Bundler, update the Gemfile or dependency constraints and regenerate Gemfile.lock so that sqlite3 resolves to a fixed version. Rebuild containers, packages, serverless artifacts, and deployment images that vendor Ruby gems. If immediate upgrade is not possible, reduce exposure by preventing untrusted users from influencing SQLite queries or custom aggregate-function behavior, disabling affected custom aggregate functionality where feasible, and isolating Ruby processes that execute SQLite workloads with least privilege and crash supervision.
How to confirm the fix worked
Confirm that all deployed Ruby applications, containers, build artifacts, and vendored dependency directories use sqlite3 gem version 2.9.5 or later. Check dependency manifests such as Gemfile.lock, gemspec files, SBOMs, and container image scans for sqlite3 versions 2.1.0 through 2.9.4. At runtime, validate with commands such as `bundle info sqlite3`, `bundle exec ruby -e 'require "sqlite3"; puts SQLite3::VERSION'`, or equivalent application diagnostics. After patching, rerun application test suites that exercise SQLite aggregate functions and monitor for Ruby segmentation faults or sqlite3_native crash reports.
Typical attack path
- Identify a Ruby application, script, service, or background job using sqlite3 gem versions 2.1.0 through 2.9.4.
- Find a feature or workflow that allows influence over SQLite queries, aggregate-function execution, or data processed by custom SQLite aggregate callbacks.
- Trigger aggregation behavior that causes the Ruby callback object lifecycle to become inconsistent.
- Force SQLite aggregation to continue referencing a callback that has already been freed.
- Cause the Ruby process to crash or enter a memory-corruption state, potentially disrupting the application or job.
How to detect it
To determine whether exploitation may have occurred, review Ruby application logs, process supervisor logs, operating-system crash reports, container termination events, and APM error traces for unexplained crashes involving the sqlite3 native extension. Focus on timestamps where users or automated clients triggered reporting, analytics, search, import/export, or other workflows that execute SQLite aggregate queries or custom aggregate functions. Useful log sources include Ruby stderr/stdout, Rails or application logs, systemd journals, container runtime logs, Kubernetes pod events, core dump metadata, crash reporters, and endpoint telemetry. Look for Ruby segmentation faults, aborts, core dumps, or native backtraces referencing sqlite3, sqlite3_native, aggregate callbacks, or SQLite user-defined aggregate functions. Also correlate crashes with unusual local user activity, repeated attempts against the same feature, or crafted inputs that influence SQL aggregation. There are no known network-level signatures or public threat-actor-specific indicators from the supplied data.
- [BUG] Segmentation fault
- ruby: [BUG] Segmentation fault
- sqlite3_native.so
- sqlite3_native.bundle
- SQLite3::Database#create_aggregate
- create_aggregate
- core dumped
- Segmentation fault (core dumped)
What your security team should do
- Inventory Ruby applications, scripts, CI jobs, containers, and packaged tools that depend on the sqlite3 gem.
- Prioritize upgrades to sqlite3 version 2.9.5 or later for applications that process untrusted input, expose user-driven querying/reporting, or rely on custom SQLite aggregate functions.
- Regenerate lockfiles and rebuild deployment artifacts to ensure the fixed gem is actually present in production images and packages.
- Add software composition analysis checks to flag sqlite3 gem versions 2.1.0 through 2.9.4.
- Review application designs that allow user influence over raw SQL, dynamic query construction, or SQLite extension behavior, and restrict them where possible.
- Monitor Ruby application crash logs for segmentation faults or native-extension crashes involving sqlite3 after suspicious user activity.
- Because EPSS is low and there is no KEV listing or known ransomware use, handle this through normal patch management unless the affected application is exposed to untrusted query input or performs high-availability business functions.
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-119338 Tesseract is an open source OCR engine. CWE-416
- CVE-2026-119332 Ladybird is a truly independent web browser. CWE-416
- CVE-2026-119116 A use-after-free and double-free issue in the SetClient command handler of the… CWE-416
- CVE-2026-119378 SQLite before 3.54.0 contains a use-after-free vulnerability in the R-Tree extension that… CWE-416
- CVE-2026-119372 SQLite before 3.54.0 built with FTS3/FTS4 and SQLITE_ENABLE_FTS3_PARENTHESIS contains a… CWE-416
- CVE-2026-65586 Software installed and run as a non-privileged user may conduct improper GPU system calls… CWE-416
- CVE-2026-15466 Software installed and run as a non-privileged user may conduct improper GPU system calls… CWE-416
- CVE-2026-76031 Use after free in Input in Google Chrome prior to 156.0.8078.79 allowed a remote attacker… CWE-416