CVE-2022-35956 update_by_case before 0.1.3 vulnerable to sql injection
CriticalCVSS 9.8
EPSS 0.65%
PoC
- Published
- Updated
- Exploit status
- Proof-of-concept only
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
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.
Upgrade path
3 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| rubygems update_by_case(RubyGems) | < 0.1.3 | 0.1.3 | Fixed |
| update by case project update by case | < 0.1.3 | 0.1.3 | Fixed |
| camilova activerecord-update-by-case | = < 0.1.3 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| rubygems update_by_case(RubyGems) | < 0.1.3 | 0.1.3 |
| camilova activerecord-update-by-case | = < 0.1.3 | No fix listed |
| update by case project update by case | < 0.1.3 | 0.1.3 |
References
- github.com third-party-advisory vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com release-notes third-party-advisory
- github.com exploit
- github.com
- github.com product