CVE-2022-24720Improper Input Validation in image_processing
image_processing is an image processing wrapper for libvips and ImageMagick/GraphicsMagick. Prior to version 1.12.2, using the `#apply` method from image_processing to apply a series of operations that are coming from unsanitized user input allows the attacker to execute shell commands. This method is called internally by Active Storage variants, so Active Storage is vulnerable as well. The vulnerability has been fixed in version 1.12.2 of image_processing. As a workaround, users who process based on user input should always sanitize the user input by allowing only a constrained set of operations.
What to do
Fixed builds are available from Debian, RubyGems, Ubuntu: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | ruby-image-processing | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | ruby-image-processing | Fixed | 1.10.3-1ubuntu0.22.04.1 | UBUNTU-CVE-2022-24720 |
| Ubuntu 20.04 | ruby-image-processing | Fixed | 1.10.3-1ubuntu0.20.04.1 | UBUNTU-CVE-2022-24720 |
| Debian 12 | ruby-image-processing | Fixed | 1.10.3-2 | DEBIAN-CVE-2022-24720 |
| RubyGems library | image_processing | Fixed | 1.12.2 | GHSA-cxf7-qrc5-9446 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- janko image_processing: affected: < 1.12.2
Vendor advisories:
- https://www.debian.org/security/2022/dsa-5310 (vendor-advisory)
References
- https://github.com/janko/image_processing/security/advisories/GHSA-cxf7-qrc5-9446
- https://github.com/janko/image_processing/commit/038e4574e8f4f4b636a62394e09983c71980dada
- https://www.debian.org/security/2022/dsa-5310
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.