CVE-2026-128084: sqlite3-ruby: Possible SQL query truncation when a string is 4 GiB or larger
sqlite3-ruby cast Ruby string lengths (long) to int before passing them to SQLite. On 64-bit platforms, a string of 4 GiB (2^32 bytes) or larger had its length wrap, so SQLite saw only the first length mod 2^32 bytes. An attacker who controls the length of a SQL string could truncate the query, for example dropping a trailing WHERE clause. The affected paths are:
- the SQL passed to
Database#prepare,#execute, and related methods - String and Blob values passed to
Statement#bind_paramand related methods - String and Blob values returned from SQL functions and aggregates defined in Ruby (
Database#create_function,#create_aggregate, and related methods)
sqlite3 v2.10.2 raises RangeError when any of these strings is longer than INT_MAX bytes.
References
- github.com/advisories/GHSA-4fqr-96q8-xrfx
- github.com/rubysec/ruby-advisory-db/blob/master/gems/sqlite3/GHSA-4fqr-96q8-xrfx.yml
- github.com/sparklemotion/sqlite3-ruby/commit/41059aa3ccc2c0f910d6df4fccfe36b3c3c6c649
- github.com/sparklemotion/sqlite3-ruby/pull/762
- github.com/sparklemotion/sqlite3-ruby/releases/tag/v2.10.2
- github.com/sparklemotion/sqlite3-ruby/security/advisories/GHSA-4fqr-96q8-xrfx
- nvd.nist.gov/vuln/detail/CVE-2026-128084
Code Behaviors & Features
Detect and mitigate CVE-2026-128084 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →