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

EcosystemPackageFixed inAdvisory
Debian:12rails2:6.1.4.7+dfsg-1DEBIAN-CVE-2022-21831
Debian:13rails2:6.1.4.7+dfsg-1DEBIAN-CVE-2022-21831
Debian:14rails2:6.1.4.7+dfsg-1DEBIAN-CVE-2022-21831
RubyGemsactivestorage7.0.2.3GHSA-w749-p3v6-hccq
RubyGemsactivestorage5.2.6.3GHSA-w749-p3v6-hccq
RubyGemsactivestorage6.0.4.7GHSA-w749-p3v6-hccq
RubyGemsactivestorage6.1.4.7GHSA-w749-p3v6-hccq
Ubuntu:24.04:LTSrailsno fix listedUBUNTU-CVE-2022-21831
Ubuntu:25.10railsno fix listedUBUNTU-CVE-2022-21831
Ubuntu:26.04:LTSrailsno fix listedUBUNTU-CVE-2022-21831
Ubuntu:26.10railsno fix listedUBUNTU-CVE-2022-21831

Affected products (as reported)

VendorProductVersions
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

References