CVE-2022-21831 in the critical feed json
Possible code injection vulnerability in Rails / Active Storage
published 2022-03-08 4 y ago modified 2026-06-17 4 mo ago also GHSA-w749-p3v6-hccq , EUVD-2022-1564
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 3.1%
- EPSS 3.1% chance of exploitation in 30 days, percentile 87%
- public exploits
- 0
- none known
Summary
A code injection vulnerability exists in the Active Storage >= v5.2.0 that could allow an attacker to execute code via image_processing arguments.
Patch / fix
- rubygems activestorage 5.2.6.3, 6.0.4.7, 6.1.4.7, 7.0.2.3
- rubyonrails active_storage 5.2.6.3, 6.0.4.7, 6.1.4.7, 7.0.2.3
- rails Debian 14, Debian 13, Debian 12 2:6.1.4.7+dfsg-1
debian advisories DEBIAN-CVE-2022-21831
- rubygem-activestorage-7.0 openSUSE Tumbleweed 7.0.8.6-1.3
- rubygem-activestorage-7.0 openSUSE Tumbleweed 7.0.8.4-1.1
- rubygem-activestorage-7.0 openSUSE Tumbleweed 7.0.2.3-1.1
- ruby3.2-rubygem-activestorage-7.0 openSUSE Tumbleweed 7.0.4.3-1.1
opensuse advisories openSUSE-SU-2025:15113-1openSUSE-SU-2024:14070-1openSUSE-SU-2024:11903-1openSUSE-SU-2024:12880-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-21831 updated cvss 9.8
rubygem-activestorage: Code injection vulnerability in ActiveStorage
-
Red Hat Satellite 6 tfm-ror52-rubygem-railsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
3.10% chance of exploitation in the next 30 days, higher than 87% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 6.8 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | activestorage | >=5.2.0, <5.2.6.3 >=6.0.0, <6.0.4.7 >=6.1.0, <6.1.4.7 >=7.0.0, <7.0.2.3 |
5.2.6.3 6.0.4.7 6.1.4.7 7.0.2.3 |
Affected products
- n/a https://github.com/rails/rails
Classification
- Weakness
-
- CWE-94 Improper Control of Generation of Code
- Technology feeds
References
-
github.com
/advisories/GHSA-w749-p3v6-hccq
advisory, patch, third-party-advisory
-
github.com
/rails/rails/commit/0a72f7d670e9aa77a0bb8584cb1411ddabb7546e
web
-
debian.org
/security/2023/dsa-5372
vendor-advisory, web
-
lists.debian.org
/debian-lts-announce/2022/09/msg00002.html
mailing-list, web, third-party-advisory
-
security.netapp.com
/advisory/ntap-20221118-0001/
third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-21831
advisory
-
github.com
/rails/rails
package
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/activestorage/CVE-2022-21831.yml
web
-
groups.google.com
/g/rubyonrails-security/c/n-p-W1yxatI
web
-
rubysec.com
/advisories/CVE-2022-21831
web
-
security.netapp.com
/advisory/ntap-20221118-0001
web
Sources
- CVE List CVE-2022-21831
- GitHub Advisory GHSA-w749-p3v6-hccq
- NVD CVE-2022-21831
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.