Breaking News: Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

GHSA-4FQR-96Q8-XRFX

Possible SQL query truncation when a string is 4 GiB or larger

Overview

Published
No date
Modified
No date
Medium GitHub advisory
1 Registry packages
0 OS packages
0 Linux distributions
Yes Fix available
CVSS score Medium, no score

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)

AFTER PATCH

sqlite3 v2.10.2 raises RangeError when any of these strings is longer than INT_MAX bytes.

Credit

This issue was responsibly reported by Luke Jahnke from elttam.

Source: OX vulnerability database

Severity

MEDIUM

No CVSS vector in the source. Severity comes from the advisory.

Affected packages · 1

Packages affected by GHSA-4FQR-96Q8-XRFX
EcosystemPackageVulnerableFixed in
RubyGems sqlite3 — 2.10.2

Open a package to see all its vulnerabilities.

Operating systems

No Linux distribution reports this ID.

References

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.