# CVE-2022-21831: Possible code injection vulnerability in Rails / Active Storage

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 3.08%, higher than 88% of CVEs (2026-12-01)
- Published: 2022-03-08T21:25:54.000Z
- Modified: 2026-06-17T04:27:03.960Z
- Also known as: GHSA-w749-p3v6-hccq
- Weaknesses: CWE-94
- Assigned by: hackerone

## Description

A code injection vulnerability exists in the Active Storage >= v5.2.0 that could allow an attacker to execute code via image_processing arguments.

(As written by CVE List.)

## Affected

- https://github.com/rails/rails: 7.0.2.3, 6.1.4.7, 6.0.4.7, 5.2.6.3
- activestorage (RubyGems): from 5.2.0 before 5.2.6.3; from 6.0.0 before 6.0.4.7; from 6.1.0 before 6.1.4.7; from 7.0.0 before 7.0.2.3
- rubyonrails active_storage: from 5.2.0 before 5.2.6.3; from 6.0.0 before 6.0.4.7; from 6.1.0 before 6.1.4.7; from 7.0.0 before 7.0.2.3
- debian debian_linux: 10.0

## Every score

- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/advisories/GHSA-w749-p3v6-hccq> (advisory, patch, third-party-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)
- <https://www.debian.org/security/2023/dsa-5372> (vendor-advisory, 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)
- <https://security.netapp.com/advisory/ntap-20221118-0001> (web)

## Sources

- CVE List: [CVE-2022-21831](https://www.cve.org/CVERecord?id=CVE-2022-21831), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-w749-p3v6-hccq](https://github.com/advisories/GHSA-w749-p3v6-hccq), CC-BY-4.0, modified 2026-03-13
- NVD: [CVE-2022-21831](https://nvd.nist.gov/vuln/detail/CVE-2022-21831), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-21831 · Whole record: https://cve.day/CVE-2022-21831.json · Rebuilt by cve.day 2026-11-25T22:58:11.959Z
