CWE
94
Advisory Published
CVE Published
Updated

CVE-2022-21831: Code Injection

First published: Tue Mar 08 2022(Updated: )

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.

Credit: support@hackerone.com support@hackerone.com

Affected SoftwareAffected VersionHow to fix
rubygems/activestorage>=7.0.0<=7.0.2.2
7.0.2.3
rubygems/activestorage>=6.1.0<=6.1.4.6
6.1.4.7
rubygems/activestorage>=6.0.0<=6.0.4.6
6.0.4.7
rubygems/activestorage>=5.2.0<=5.2.6.2
5.2.6.3
>=5.2.0<5.2.6.3
>=6.0.0<6.0.4.7
>=6.1.0<6.1.4.7
>=7.0.0<7.0.2.3
=10.0
Rubyonrails Active Storage>=5.2.0<5.2.6.3
Rubyonrails Active Storage>=6.0.0<6.0.4.7
Rubyonrails Active Storage>=6.1.0<6.1.4.7
Rubyonrails Active Storage>=7.0.0<7.0.2.3
Debian Debian Linux=10.0
debian/rails<=2:5.2.2.1+dfsg-1<=2:6.1.4.6+dfsg-2<=2:6.0.3.7+dfsg-2<=2:5.2.2.1+dfsg-1+deb10u3
debian/rails<=2:5.2.2.1+dfsg-1+deb10u3
2:5.2.2.1+dfsg-1+deb10u5
2:6.0.3.7+dfsg-2+deb11u2
2:6.1.7.3+dfsg-1
2:6.1.7.3+dfsg-2

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2022-21831?

    The severity of CVE-2022-21831 is critical with a CVSS score of 9.8.

  • Which versions of Rails are affected by CVE-2022-21831?

    Versions 5.2.0 to 5.2.6.2, 6.0.0 to 6.0.4.6, 6.1.0 to 6.1.4.6, and 7.0.0 to 7.0.2.2 of Rails are affected by CVE-2022-21831.

  • How can I mitigate the code injection vulnerability in Active Storage?

    To mitigate the code injection vulnerability in Active Storage, update to versions 5.2.6.3, 6.0.4.7, 6.1.4.7, or 7.0.2.3 of Rails.

  • Is there a workaround for CVE-2022-21831?

    Implementing a strict allow-list on accepted transformation methods or arguments can serve as a workaround for CVE-2022-21831.

  • Where can I find more information about CVE-2022-21831?

    More information about CVE-2022-21831 can be found at the following references: [NVD](https://nvd.nist.gov/vuln/detail/CVE-2022-21831), [Github Commit](https://github.com/rails/rails/commit/0a72f7d670e9aa77a0bb8584cb1411ddabb7546e), [Google Groups](https://groups.google.com/g/rubyonrails-security/c/n-p-W1yxatI).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203