Vulnerability · Published May 26, 2022 · Assigned by hackerone
CVE-2022-21831
Critical 9.8
In plain English
A critical-severity code injection in https://github.com/rails/rails. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 3.1% (higher than 88% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Severity (CVSS NVD)9.8Critical
Exploit odds (30 days)3.1%top 12.2% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack tooling1Public PoC
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | rails | 2:6.1.4.7+dfsg-1 | DEBIAN-CVE-2022-21831 |
| Debian:13 | rails | 2:6.1.4.7+dfsg-1 | DEBIAN-CVE-2022-21831 |
| Debian:14 | rails | 2:6.1.4.7+dfsg-1 | DEBIAN-CVE-2022-21831 |
| RubyGems | activestorage | 7.0.2.3 | GHSA-w749-p3v6-hccq |
| RubyGems | activestorage | 5.2.6.3 | GHSA-w749-p3v6-hccq |
| RubyGems | activestorage | 6.0.4.7 | GHSA-w749-p3v6-hccq |
| RubyGems | activestorage | 6.1.4.7 | GHSA-w749-p3v6-hccq |
| Ubuntu:24.04:LTS | rails | no fix listed | UBUNTU-CVE-2022-21831 |
| Ubuntu:25.10 | rails | no fix listed | UBUNTU-CVE-2022-21831 |
| Ubuntu:26.04:LTS | rails | no fix listed | UBUNTU-CVE-2022-21831 |
| Ubuntu:26.10 | rails | no fix listed | UBUNTU-CVE-2022-21831 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | https://github.com/rails/rails | 7.0.2.3, 6.1.4.7, 6.0.4.7, 5.2.6.3 |
Weakness: CWE-94