CVE-2022-24720
published 2022-03-01CVE-2022-24720: image_processing is an image processing wrapper for libvips and ImageMagick/GraphicsMagick. Prior to version 1.12.2, using the `#apply` method from…
PriorityP359critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
EPSS
2.63%
84.0th percentile
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.
Affected
5 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | debian_linux | — | — |
| debian | ruby-image-processing | < ruby-image-processing 1.10.3-2 (bookworm) | ruby-image-processing 1.10.3-2 (bookworm) |
| image_processing_project | image_processing | < 1.12.2 | 1.12.2 |
| image_processing_project | image_processing | >= 0 < 1.12.2 | 1.12.2 |
| janko | image_processing | < 1.12.2 | 1.12.2 |
CVSS provenance
nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.010.0CRITICALAV:N/AC:L/Au:N/C:C/I:C/A:C
osv9.8CRITICAL
vendor_debian9.8CRITICAL
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
Remote shell execution vulnerability in image_processing
ghsa·2022-03-01
CVE-2022-24720 [CRITICAL] CWE-20 Remote shell execution vulnerability in image_processing
Remote shell execution vulnerability in image_processing
### Impact
When using the `#apply` method from image_processing to apply a series of operations that are coming from unsanitized user input, this allows the attacker to execute shell commands:
```rb
ImageProcessing::Vips.apply({ system: "echo EXECUTED" })
#>> EXECUTED
```
This method is called internally by Active Storage variants, so Active Storage is vulnerable as well.
### Patches
The vulnerability has been fixed in version 1.12.2 of image_processing.
### Workarounds
If you're processing based on user input, it's highly recommended that you always sanitize the user input, by allowing only a constrained set of operations. For example:
```rb
operations = params[:operations]
.map { |operation| [operation[:name], *operation[:
OSV
CVE-2022-24720: image_processing is an image processing wrapper for libvips and ImageMagick/GraphicsMagick
osv·2022-03-01·CVSS 9.8
CVE-2022-24720 [CRITICAL] CVE-2022-24720: image_processing is an image processing wrapper for libvips and ImageMagick/GraphicsMagick
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.
OSV
Remote shell execution vulnerability in image_processing
osv·2022-03-01
CVE-2022-24720 [CRITICAL] Remote shell execution vulnerability in image_processing
Remote shell execution vulnerability in image_processing
### Impact
When using the `#apply` method from image_processing to apply a series of operations that are coming from unsanitized user input, this allows the attacker to execute shell commands:
```rb
ImageProcessing::Vips.apply({ system: "echo EXECUTED" })
#>> EXECUTED
```
This method is called internally by Active Storage variants, so Active Storage is vulnerable as well.
### Patches
The vulnerability has been fixed in version 1.12.2 of image_processing.
### Workarounds
If you're processing based on user input, it's highly recommended that you always sanitize the user input, by allowing only a constrained set of operations. For example:
```rb
operations = params[:operations]
.map { |operation| [operation[:name], *operation[:
Ubuntu
ImageProcessing vulnerability
vendor_ubuntu·2024-03-05
CVE-2022-24720 ImageProcessing vulnerability
Title: ImageProcessing vulnerability
Summary: ImageProcessing could be made to crash or run programs as an administrator
if it received specially crafted input.
It was discovered that ImageProcessing incorrectly handled series of operations
that are coming from unsanitised inputs. If a user or an automated system were
tricked into opening a specially crafted input file, a remote attacker could
possibly use this issue to execute arbitrary code.
Instructions: In general, a standard system update will make all the necessary changes.
Debian
CVE-2022-24720: ruby-image-processing - image_processing is an image processing wrapper for libvips and ImageMagick/Grap...
vendor_debian·2022·CVSS 9.8
CVE-2022-24720 [CRITICAL] CVE-2022-24720: ruby-image-processing - image_processing is an image processing wrapper for libvips and ImageMagick/Grap...
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.
Scope: local
bookworm: resolved (fixed in 1.10.3-2)
bullseye: resolved (fixed in 1.10.3-1+deb11u1)
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/janko/image_processing/commit/038e4574e8f4f4b636a62394e09983c71980dadahttps://github.com/janko/image_processing/security/advisories/GHSA-cxf7-qrc5-9446https://www.debian.org/security/2022/dsa-5310https://github.com/janko/image_processing/commit/038e4574e8f4f4b636a62394e09983c71980dadahttps://github.com/janko/image_processing/security/advisories/GHSA-cxf7-qrc5-9446https://www.debian.org/security/2022/dsa-5310
2022-03-01
Published