CVE-2026-128084: sqlite3-ruby Possible SQL Query Truncation When Vulnerability
MODERATECVE-2026-128084 is a MODERATE (CVSS 4.8) possible sql query truncation when vulnerability (CWE-681: Incorrect Conversion between Numeric Types) affecting sqlite3-ruby libraries in the RubyGems ecosystem. The issue involves possible sql query truncation when a string is 4 gib or larger. Remediation is available by upgrading affected packages to version 2.10.2.
CVE-2026-128084 at a Glance
Security Impact
CVSS: 4.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2026-128084
To remediate this vulnerability, upgrade all affected sqlite3-ruby dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade sqlite3 to 2.10.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for sqlite3
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-128084, inspect your project dependencies for sqlite3-ruby:
inspect dependencies for sqlite3
Analyze the terminal output to locate any version of sqlite3-ruby in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-681: Incorrect Conversion between Numeric Types, where when converting from one data type to another, such as long to integer, data can be omitted or translated in a way that produces unexpected values. if the resulting values are used in a sensitive context, then dangerous behaviors may occur. In sqlite3-ruby, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-128084 Affected sqlite3-ruby Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sqlite3
|
RubyGems |
< 2.10.2
|
2.10.2
|
References
Frequently Asked Questions
What is CVE-2026-128084?
Which sqlite3-ruby versions are affected?
What version fixes CVE-2026-128084?
Is sqlite3 affected?
What is the CVSS score of CVE-2026-128084?
What CWE is associated with CVE-2026-128084?
How can I check RubyGems dependencies for CVE-2026-128084?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4fqr-96q8-xrfx",
"modified" : "2026-11-13T18:57:58Z",
"published" : "2026-11-13T18:57:58Z",
"aliases" : [ "CVE-2026-128084" ],
"summary" : "sqlite3-ruby: Possible SQL query truncation when a string is 4 GiB or larger",
"details" : "### Summary\n\nsqlite3-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:\n\n- the SQL passed to `Database#prepare`, `#execute`, and related methods\n- String and Blob values passed to `Statement#bind_param` and related methods\n- String and Blob values returned from SQL functions and aggregates defined in Ruby (`Database#create_function`, `#create_aggregate`, and related methods)\n\nsqlite3 v2.10.2 raises `RangeError` when any of these strings is longer than `INT_MAX` bytes.\n\n### Severity\n\nThe sqlite3-ruby maintainers have evaluated this as medium severity (CVSS 4.8). Exploitation requires an attacker to get at least 4 GiB into a single SQL string or bound value. Most deployments reject a request body that large before the application sees it, and the server must hold several copies of the string in memory.\n\nA truncated bound value is only a prefix of the attacker's input, so the bind paths matter only where the application validated the full value. A truncated SQL string is more serious: when the attacker's input is inlined into the SQL, the clauses that follow it are dropped. If a dropped clause contained a bind placeholder, binding raises `SQLite3::RangeException` instead of running the query.\n\n### Mitigation\n\nUpgrade to sqlite3 v2.10.2 or later.\n\nAs 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.\n\n### Credit\n\nThis issue was responsibly reported by Luke Jahnke from elttam.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "sqlite3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.10.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.10.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/sparklemotion/sqlite3-ruby/security/advisories/GHSA-4fqr-96q8-xrfx"
}, {
"type" : "WEB",
"url" : "https://github.com/sparklemotion/sqlite3-ruby/pull/762"
}, {
"type" : "WEB",
"url" : "https://github.com/sparklemotion/sqlite3-ruby/commit/41059aa3ccc2c0f910d6df4fccfe36b3c3c6c649"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sqlite3/GHSA-4fqr-96q8-xrfx.yml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/sparklemotion/sqlite3-ruby"
}, {
"type" : "WEB",
"url" : "https://github.com/sparklemotion/sqlite3-ruby/releases/tag/v2.10.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-681" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-11-13T18:57:58Z",
"nvd_published_at" : null
}
}