{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-35956","id":"CVE-2022-35956","title":"update_by_case before 0.1.3 vulnerable to sql injection","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 sanit","descriptionLong":"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:08.000Z","updated":"2026-10-28T02:30:42.991957366Z","reserved":"2022-07-15T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","rating":"medium","source":"github.com"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","rating":"medium","source":"OSV"},{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","rating":"medium","source":"GitHub"}],"rating":"medium","products":["camilova activerecord-update-by-case"],"affectedProducts":[{"vendor":"camilova","product":"activerecord-update-by-case","defaultStatus":null,"versions":[{"status":"affected","version":"< 0.1.3"}],"platforms":[]}],"packages":[{"ecosystem":"RubyGems","name":"update_by_case","purl":"pkg:gem/update_by_case","ranges":["<0.1.3"],"fixed":["0.1.3"],"advisory":"GHSA-33wh-w4m7-c6r8"}],"cwes":["CWE-89"],"aliases":["GHSA-33wh-w4m7-c6r8"],"references":[{"url":"https://github.com/camilova/activerecord-update-by-case/security/advisories/GHSA-33wh-w4m7-c6r8","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/camilova/activerecord-update-by-case/releases/tag/v0.1.3-stable","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35956.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-35956","tags":["advisory"]},{"url":"https://github.com/camilova/activerecord-update-by-case","tags":["package"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/update_by_case/CVE-2022-35956.yml","tags":["web"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00649,"epssPercentile":0.51894,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-35956","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-35956","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-35956","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-33wh-w4m7-c6r8","ok":true,"note":"GHSA-33wh-w4m7-c6r8"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-35956","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}