CVE-2022-21831
JSON

9.8critical

Possible code injection vulnerability in Rails / Active Storage

Severity
9.8critical CVSS:3.1 by NVD
Exploit likelihood
3.08% (higher than 88% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
hackerone
Also known as
GHSA-w749-p3v6-hccq

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

Product or packageVersionsReported by
https://github.com/rails/rails7.0.2.3, 6.1.4.7, 6.0.4.7, 5.2.6.3CVE List
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.3GitHub Advisory Database
rubyonrails active_storagefrom 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.3NVD
debian debian_linux10.0NVD

All scores

GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD6.8medium CVSS:2.0AV:N/AC:M/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

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

GitHub Advisory Database

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.

NVD (es)

Se presenta una vulnerabilidad de inyección de código en Active Storage versiones posteriores a v5.2.0 incluyéndola, que podría permitir a un atacante ejecutar código por medio de argumentos image_processing

References

Sources

SourceRecordLicence
CVE ListCVE-2022-21831 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-w749-p3v6-hccq changed 2026-03-13CC-BY-4.0
NVDCVE-2022-21831 changed 2026-06-17Public domain