Vulnerability Details : CVE-2022-35956
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.
Vulnerability category: Sql Injection
Products affected by CVE-2022-35956
- cpe:2.3:a:update_by_case_project:update_by_case:*:*:*:*:*:ruby:*:*
Exploit prediction scoring system (EPSS) score for CVE-2022-35956
0.07%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 22 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2022-35956
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
9.8
|
CRITICAL | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
3.9
|
5.9
|
NIST | |
5.8
|
MEDIUM | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L |
1.6
|
3.7
|
GitHub, Inc. |
CWE ids for CVE-2022-35956
-
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.Assigned by: security-advisories@github.com (Primary)
References for CVE-2022-35956
-
https://github.com/camilova/activerecord-update-by-case/security/advisories/GHSA-33wh-w4m7-c6r8
update_by_case before 0.1.3 can be vulnerable to sql injection · Advisory · camilova/activerecord-update-by-case · GitHubThird Party Advisory
-
https://github.com/camilova/activerecord-update-by-case/releases/tag/v0.1.3-stable
Release v0.1.3-stable · camilova/activerecord-update-by-case · GitHubRelease Notes;Third Party Advisory
Jump to