Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. activestorage
  4. ›
  5. CVE-2022-21831

CVE-2022-21831: Improper Control of Generation of Code ('Code Injection')

May 26, 2022 (updated March 14, 2023)

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

References

  • github.com/advisories/GHSA-w749-p3v6-hccq
  • github.com/rails/rails/commit/0a72f7d670e9aa77a0bb8584cb1411ddabb7546e
  • groups.google.com/g/rubyonrails-security/c/n-p-W1yxatI
  • nvd.nist.gov/vuln/detail/CVE-2022-21831
  • rubysec.com/advisories/CVE-2022-21831/

Code Behaviors & Features

Detect and mitigate CVE-2022-21831 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 5.2.0 before 5.2.6.3, all versions starting from 6.0.0 before 6.0.4.7, all versions starting from 6.1.0 before 6.1.4.7, all versions starting from 7.0.0 before 7.0.2.3

Fixed versions

  • 5.2.6.3
  • 6.0.4.7
  • 6.1.4.7
  • 7.0.2.3

Solution

Upgrade to versions 5.2.6.3, 6.0.4.7, 6.1.4.7, 7.0.2.3 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

gem/activestorage/CVE-2022-21831.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:39 +0000.