{"id":"CVE-2022-35956","aliases":["GHSA-33wh-w4m7-c6r8"],"url":"https://o3.security/vulnerability/CVE-2022-35956","summary":"update_by_case before 0.1.3 vulnerable to sql injection","details":"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.","published":"2022-08-12T20:50:08Z","modified":"2026-07-15T01:48:52.589448654Z","cvss":{"score":5.8,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"RubyGems","name":"update_by_case","fixedVersion":"0.1.3"}],"fix":null,"references":[{"type":"WEB","url":"https://github.com/camilova/activerecord-update-by-case/releases/tag/v0.1.3-stable"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35956.json"},{"type":"ADVISORY","url":"https://github.com/camilova/activerecord-update-by-case/security/advisories/GHSA-33wh-w4m7-c6r8"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-35956"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-15T01:48:52.589448654Z"}}