CVSS 3.1
9.8 criticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HCritical (9.8). EPSS 3.1% estimated probability of exploitation activity in the next 30 days. Fixed in activestorage 5.2.6.3, 6.0.4.7, 6.1.4.7.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:Hactivestorage (RubyGems): fixed in 5.2.6.3, 6.0.4.7, 6.1.4.7, 7.0.2.3Explain CVE-2022-21831 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-21831?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-21831?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-21831 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
From the NVD's CPE matches.
| Product | Affected |
|---|---|
| rubyonrails:active_storage | from 5.2.0 before 5.2.6.3 |
| rubyonrails:active_storage | from 6.0.0 before 6.0.4.7 |
| rubyonrails:active_storage | from 6.1.0 before 6.1.4.7 |
| rubyonrails:active_storage | from 7.0.0 before 7.0.2.3 |
| debian:debian_linux | 10.0 |
| Advisory | Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-w749-p3v6-hccq | RubyGems | activestorage | >=5.2.0 <5.2.6.3 | 5.2.6.3 |
| GHSA-w749-p3v6-hccq | RubyGems | activestorage | >=6.0.0 <6.0.4.7 | 6.0.4.7 |
| GHSA-w749-p3v6-hccq | RubyGems | activestorage | >=6.1.0 <6.1.4.7 | 6.1.4.7 |
| GHSA-w749-p3v6-hccq | RubyGems | activestorage | >=7.0.0 <7.0.2.3 | 7.0.2.3 |
| Distribution | Release | Package | Fixed in | Advisory |
|---|---|---|---|---|
| Debian | 10 | rails | 2:5.2.2.1+dfsg-1+deb10u4 | DLA-3093-1 |
| Debian | 11 | rails | 2:6.0.3.7+dfsg-2+deb11u1 | DSA-5372-1 |
| Debian | 12, 13, 14 | rails | 2:6.1.4.7+dfsg-1 | DEBIAN-CVE-2022-21831 |
| Ubuntu | 24.04:LTS, 25.10, 26.04:LTS and 5 more | rails | no fix listed | UBUNTU-CVE-2022-21831 |
| openSUSE | Tumbleweed | ruby3.2-rubygem-activestorage-7.0 | 7.0.4.3-1.1 | openSUSE-SU-2024:12880-1 |
| openSUSE | Tumbleweed | rubygem-activestorage-7.0 | 7.0.2.3-1.1 | openSUSE-SU-2024:11903-1 |
| openSUSE | Tumbleweed | rubygem-activestorage-7.0 | 7.0.8.4-1.1 | openSUSE-SU-2024:14070-1 |
| openSUSE | Tumbleweed | rubygem-activestorage-7.0 | 7.0.8.6-1.3 | openSUSE-SU-2025:15113-1 |
From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · openSUSE.
Red Hat rates this Important.
To work around this issue, applications should implement a strict allow-list on accepted transformation methods or arguments. Additionally, a strict image magick security policy will help mitigate this issue:
https://imagemagick.org/script/security-policy.php
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Satellite 6 | tfm-ror52-rubygem-rails | Not affected |
Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-21831.
The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.