{"cve":"CVE-2022-35956","nvd":{"published":"2022-08-12T21:15:08.113","modified":"2026-06-17T04:52:35.877","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8},"cwes":["CWE-89"],"references":["https://github.com/camilova/activerecord-update-by-case/releases/tag/v0.1.3-stable","https://github.com/camilova/activerecord-update-by-case/security/advisories/GHSA-33wh-w4m7-c6r8","https://github.com/camilova/activerecord-update-by-case/releases/tag/v0.1.3-stable","https://github.com/camilova/activerecord-update-by-case/security/advisories/GHSA-33wh-w4m7-c6r8"],"products":["update_by_case_project:update_by_case"],"source":"nvd","synced_at":"2026-10-19T21:34:18.502168378+00:00"},"epss":{"cve":"CVE-2022-35956","score":0.00649,"percentile":0.511,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-33wh-w4m7-c6r8","url":"https://osv.dev/vulnerability/GHSA-33wh-w4m7-c6r8","summary":"update_by_case before 0.1.3 can be vulnerable to sql injection","modified":"2023-11-08T04:09:54.202763Z","packages":[{"ecosystem":"RubyGems","name":"update_by_case","purl":"pkg:gem/update_by_case","ranges":["<0.1.3"],"fixed":["0.1.3"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}