
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-128084 is a SQL query truncation vulnerability in the sqlite3-ruby gem (Ruby bindings for SQLite3) caused by an incorrect numeric type conversion. The C extension casts Ruby string lengths from long (64-bit) to int (32-bit) before passing SQL strings and bound values to SQLite, causing integer wraparound on 64-bit platforms for strings ≥ 4 GiB. This can result in SQLite processing only a prefix of the string, potentially dropping trailing SQL clauses such as WHERE conditions. All versions prior to 2.10.2 of the sqlite3 RubyGem (sparklemotion/sqlite3-ruby) are affected. The vulnerability was discovered by Luke Jahnke from elttam, disclosed on October 26, 2026, and carries a CVSS v3.1 base score of 4.8 (Medium) (GitHub Advisory).
The root cause is CWE-681 (Incorrect Conversion between Numeric Types): the C extension used explicit (int)RSTRING_LEN(...) casts in statement.c (for Database#prepare, Statement#bind_param) and database.c (for custom SQL functions/aggregates via Database#create_function and Database#create_aggregate). On 64-bit platforms, a string ≥ 4 GiB (2^32 bytes) causes the length to wrap modulo 2^32, so SQLite receives a truncated length and reads only a prefix of the string. For SQL strings, this can silently drop trailing clauses (e.g., a WHERE condition); for bound values, exploitation is limited to cases where the application validated the full value before binding. The fix replaces all (int)RSTRING_LEN(...) casts with RSTRING_LENINT(...), which raises a RangeError instead of silently truncating (GitHub PR #762, Commit 41059aa).
The primary risk is authentication or access control bypass: an attacker who can inject a ≥ 4 GiB string into a SQL query could cause trailing WHERE clauses to be silently dropped, potentially returning all rows from a table or bypassing row-level filtering. This results in low confidentiality impact (unauthorized data read) and low integrity impact (unintended query behavior), with no direct availability impact. Exploitation is constrained by the requirement that the application and server must accept, retain, and pass a string of at least 4 GiB to the sqlite3-ruby layer, which most production deployments prevent via request body size limits (GitHub Advisory).
No public proof-of-concept exploit code or in-the-wild exploitation has been reported as of the disclosure date. The NVD SSVC assessment classifies exploitation as "none" and the technical impact as "partial". The EPSS score is approximately 0.314%, reflecting a low probability of near-term exploitation. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation is further constrained by the high attack complexity: the attacker must control a string of at least 4 GiB that reaches the sqlite3-ruby layer without being rejected by upstream size limits (GitHub Advisory, Feedly).
sqlite3 gem version ≤ 2.10.1 on a 64-bit platform that accepts large, attacker-controlled input and passes it (directly or indirectly) into a SQL string or bound parameter without enforcing a size limit below 4 GiB.WHERE user_id = 1) must be placed after the 4 GiB mark so it gets truncated.Database#prepare or #execute).int, wrapping it to a small value. SQLite processes only the prefix, dropping the trailing WHERE clause or other SQL conditions.SQLite3::RangeError exceptions in application logs (post-patch, indicating attempted exploitation against a patched system).Upgrade the sqlite3 RubyGem to version 2.10.2 or later, which replaces unsafe (int)RSTRING_LEN(...) casts with RSTRING_LENINT(...) to raise a RangeError for strings exceeding INT_MAX bytes. As a workaround for applications that cannot immediately upgrade, explicitly reject SQL strings and bound values of 4 GiB or larger before passing them to sqlite3-ruby, or enforce request body size limits well below 4 GiB at the web server or application layer. Most production deployments (e.g., those using Rack, Nginx, or similar middleware with default body size limits) are already protected by upstream size restrictions (GitHub Advisory, Release v2.10.2).
The vulnerability was responsibly disclosed by Luke Jahnke from security research firm elttam and coordinated with the sqlite3-ruby maintainers before public release. The maintainers (sparklemotion) assessed the severity as moderate (CVSS 4.8), noting that real-world exploitation is constrained by the impracticality of passing 4 GiB strings through typical web infrastructure. No significant broader media coverage or notable community controversy has been observed beyond standard advisory distribution channels (GitHub Advisory).
Fix availability across major Linux distributions and their releases.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."