Security mailing lists by PureSourceCode

CVE-2022-35956

CRITICAL 9.8CVSS 3.1

update_by_case before 0.1.3 can be vulnerable to sql injection

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
12 Aug 2022
Last modified
17 Jun 2026
Assigned by
security-advisories@github.com
NVD status
Modified
Weakness
CWE-89
Also known as
GHSA-33wh-w4m7-c6r8
Sources
NVDJSONOSV GHSA-33wh-w4m7-c6r8JSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.1 CRITICAL 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD security-advisories@github.com (Secondary) CVSS 3.1 MEDIUM 5.8 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L
OSV GitHub CVSS 3.1 MEDIUM 5.8 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD update_by_case_project update_by_case
cpe:2.3:a:update_by_case_project:update_by_case:*:*:*:*:*:ruby:*:*
< 0.1.3 0.1.3
OSV RubyGems update_by_case < 0.1.3 0.1.3

References

History

  • 25 Nov 2026 20:34 UTC · NVD: first stored (published 12 Aug 2022)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 11 Aug 2022)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.