CVE-2022-35956
published medium CVSS 3.1 · 5.8update_by_case before 0.1.3 vulnerable to sql injection
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| camilova | — | activerecord-update-by-case< 0.1.3 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 5.8 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| camilova | activerecord-update-by-case | < 0.1.3 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-89 CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
References
2Provider assertions
3GitHub_M · cna
update_by_case before 0.1.3 vulnerable to sql injection
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 31eb7d0688b2c968d5908a52273ebb27f600204a1f5bb9cace32e5ca1dafdd05
- Ingested
- 23 Sep 2026, 08:01:20 UTC
- Source record
- Official CVE record