{"id":"GHSA-33wh-w4m7-c6r8","summary":"update_by_case before 0.1.3 can be vulnerable to sql injection","details":"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 \u003e= 0.1.3 that uses `Arel` instead to construct the resulting sql statement, with sanitized sql.","aliases":["CVE-2022-35956"],"modified":"2023-11-01T04:59:25.043137Z","published":"2022-08-11T21:18:31Z","database_specific":{"github_reviewed_at":"2022-08-11T21:18:31Z","nvd_published_at":"2022-08-12T21:15:00Z","cwe_ids":["CWE-89"],"severity":"MODERATE","github_reviewed":true},"references":[{"type":"WEB","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"},{"type":"PACKAGE","url":"https://github.com/camilova/activerecord-update-by-case"},{"type":"WEB","url":"https://github.com/camilova/activerecord-update-by-case/releases/tag/v0.1.3-stable"},{"type":"WEB","url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/update_by_case/CVE-2022-35956.yml"}],"affected":[{"package":{"name":"update_by_case","ecosystem":"RubyGems","purl":"pkg:gem/update_by_case"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.3"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/08/GHSA-33wh-w4m7-c6r8/GHSA-33wh-w4m7-c6r8.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L"}]}