All reports
Critical

Possible code injection vulnerability in Rails / Active Storage

Affected versions

Affected versions
>= 5.2.0, <= 5.2.6.2
Fixed version
5.2.6.3
Affected versions
>= 7.0.0, <= 7.0.2.2
Fixed version
7.0.2.3
Affected versions
>= 6.1.0, <= 6.1.4.6
Fixed version
6.1.4.7
Affected versions
>= 6.0.0, <= 6.0.4.6
Fixed version
6.0.4.7

Exploitation

CVE-2022-21831

Probability of exploitation in the next 30 days: 3.10%

FIRST EPSS · 2026-11-22

Description

The Active Storage module of Rails starting with version 5.2.0 is possibly vulnerable to code injection. This issue was patched in versions 5.2.6.3, 6.0.4.7, 6.1.4.7, and 7.0.2.3. To work around this issue, applications should implement a strict allow-list on accepted transformation methods or arguments. Additionally, a strict ImageMagick security policy will help mitigate this issue.

Links

Credits

  • sergey-alekseev