RubyGems
CVE-2026-128084
sqlite3-ruby: Possible SQL query truncation when a string is 4 GiB or larger
- Severity
- Medium 4.8
- Published
- 13 Nov 2026
- Last changed
- 13 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 2.10.2
- Exploit chance
- 0.3% in the next 30 daysHigher than 24% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Read some data · Change some data
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N- Also known as
- GHSA-4fqr-96q8-xrfx
- Sources
- OSV.dev and GitHub
Description
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_param and 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.
Workarounds
Upgrade to sqlite3 v2.10.2 or later.
As a workaround for earlier versions, reject SQL strings and bound values of 4 GiB or larger before passing them to sqlite3-ruby, or limit request body size well below 4 GiB.
Affected software
| Software | Affected versions |
|---|---|
sqlite3RubyGems · osv:RubyGems:sqlite3 |
|
About sqlite3
- Total downloads (RubyGems)
- 203,243,608RubyGems, 24 Nov 2026
This is the only vulnerability in sqlite3 in our list.
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-128084
- GitHub Advisory Database https://github.com/advisories/GHSA-4fqr-96q8-xrfx