Vulnerability 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 Score
MEDIUM
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| Update By Case Project | Update By Case | < 0.1.3 |
Related Weaknesses (CWE)
References
- https://github.com/camilova/activerecord-update-by-case/releases/tag/v0.1.3-stabRelease NotesThird Party Advisory
- https://github.com/camilova/activerecord-update-by-case/security/advisories/GHSAThird Party Advisory
- https://github.com/camilova/activerecord-update-by-case/releases/tag/v0.1.3-stabRelease NotesThird Party Advisory
- https://github.com/camilova/activerecord-update-by-case/security/advisories/GHSAThird Party Advisory
FAQ
What is CVE-2022-35956?
CVE-2022-35956 is a vulnerability with a CVSS score of 5.8 (MEDIUM). 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`...
How severe is CVE-2022-35956?
CVE-2022-35956 has been rated MEDIUM with a CVSS base score of 5.8/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2022-35956?
Check the references section above for vendor advisories and patch information. Affected products include: Update By Case Project Update By Case.