CVE-2022-21831
CRITICAL 9.8CVSS 3.1Possible code injection vulnerability in Rails / Active Storage
A code injection vulnerability exists in the Active Storage >= v5.2.0 that could allow an attacker to execute code via image_processing arguments.
- Published
- 26 May 2022
- Last modified
- 17 Jun 2026
- Assigned by
- support@hackerone.com
- NVD status
- Modified
- Weakness
- CWE-94
- Also known as
- GHSA-w749-p3v6-hccq
- Sources
- NVDJSONOSV GHSA-w749-p3v6-hccqJSON
Scores
| Source | Scored by | Version | Score | Vector / 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 |
| OSV | GitHub | 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 | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 6.8 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | rubyonrails | active_storagecpe:2.3:a:rubyonrails:active_storage:*:*:*:*:*:ruby:*:* |
>= 5.2.0, < 5.2.6.3 | 5.2.6.3 |
| NVD | rubyonrails | active_storagecpe:2.3:a:rubyonrails:active_storage:*:*:*:*:*:ruby:*:* |
>= 6.0.0, < 6.0.4.7 | 6.0.4.7 |
| NVD | rubyonrails | active_storagecpe:2.3:a:rubyonrails:active_storage:*:*:*:*:*:ruby:*:* |
>= 6.1.0, < 6.1.4.7 | 6.1.4.7 |
| NVD | rubyonrails | active_storagecpe:2.3:a:rubyonrails:active_storage:*:*:*:*:*:ruby:*:* |
>= 7.0.0, < 7.0.2.3 | 7.0.2.3 |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* |
= 10.0 | |
| OSV | RubyGems | activestorage | >= 5.2.0, < 5.2.6.3 | 5.2.6.3 |
| OSV | RubyGems | activestorage | >= 6.0.0, < 6.0.4.7 | 6.0.4.7 |
| OSV | RubyGems | activestorage | >= 6.1.0, < 6.1.4.7 | 6.1.4.7 |
| OSV | RubyGems | activestorage | >= 7.0.0, < 7.0.2.3 | 7.0.2.3 |
References
- https://github.com/advisories/GHSA-w749-p3v6-hccq · Patch, Third Party Advisory, ADVISORY
- https://lists.debian.org/debian-lts-announce/2022/09/msg00002.html · Mailing List, Third Party Advisory, WEB
- https://security.netapp.com/advisory/ntap-20221118-0001/ · Third Party Advisory, WEB
- https://www.debian.org/security/2023/dsa-5372 · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-21831 · ADVISORY
- https://github.com/rails/rails/commit/0a72f7d670e9aa77a0bb8584cb1411ddabb7546e · WEB
- https://github.com/rails/rails · PACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activestorage/CVE-2022-21831.yml · WEB
- https://groups.google.com/g/rubyonrails-security/c/n-p-W1yxatI · WEB
- https://rubysec.com/advisories/CVE-2022-21831 · WEB
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 26 May 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 8 Mar 2022)