CVE-2022-35956
CWE-89Published: August 12, 2022· Updated: Jun 17, 2026
Official Description
This Rails gem adds two methods to the ActiveRecord::Base class that allow you to update many records on a single database hit, using a case sql statement for it. Before version 0.1.3 `update_by_case` gem used custom sql strings, and it was not sanitized, making it vulnerable to sql injection. Upgrade to version >= 0.1.3 that uses `Arel` instead to construct the resulting sql statement, with sanitized sql.
Risk Analysis
The update_by_case Rails gem used unsanitized custom SQL strings, leading to SQL injection vulnerabilities. This critical flaw allows attackers to execute arbitrary database commands remotely.
No public exploit is known, and it is not in the CISA KEV. It is remotely exploitable with low complexity.
Update the update_by_case gem to version 0.1.3 or later, which utilizes Arel for secure, sanitized SQL construction.
Technical Analysis
CVE-2022-35956 can be exploited remotely over the network without requiring physical or adjacent access, significantly expanding the attack surface for threat actors.
The vulnerability requires no privileges and no user interaction, making it a prime target for automated exploitation campaigns and worm-like propagation.
A successful exploit results in complete confidentiality breach (data exposure), full integrity compromise (data manipulation), availability disruption (denial of service), with a CVSS base score of 9.8.
From a weakness classification perspective (CWE-89): SQL injection vulnerabilities allow attackers to manipulate database queries, potentially exposing or modifying sensitive data.
CVSS v3.1 Vector Breakdown
Affected Vendors & Products
Exploit & PoC Resources
Official Patches & Advisories
All References (4)
Quick Facts
Related CVEs (CWE-89)
Recommended Actions
- →Apply vendor patches immediately
- →Monitor CVE-2022-35956 in threat intel feeds
- →Review IDS/IPS signatures for exploitation attempts