CVE-2022-24720
Improper 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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
9.8
Improper 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.
- Record
CVE-2022-24720- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-20
- Updated
- 2026-11-02
EUVDEUVD-2022-1412
9.8
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.
- Record
EUVD-2022-1412- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-cxf7-qrc5-9446
9.8
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:
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:
operations = params[:operations]
.map { |operation| [operation[:name], *operation[:value]] }
.select { |name, *| name.to_s.include? %w[resize_to_limit strip ...] } # sanitization
ImageProcessing::Vips.apply(operations)
- Record
GHSA-cxf7-qrc5-9446- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-20, CWE-78
- Updated
- 2026-11-02
NVD
9.8
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.
- Record
CVE-2022-24720- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 10.0 High
AV:N/AC:L/Au:N/C:C/I:C/A:C - Weakness
- CWE-20
- Updated
- 2026-11-02
OSV
9.8
Improper 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.
- Record
CVE-2022-24720- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-20
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2022-24720
9.8
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.
- Record
DEBIAN-CVE-2022-24720- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
OSVGHSA-cxf7-qrc5-9446
9.8
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:
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:
operations = params[:operations]
.map { |operation| [operation[:name], *operation[:value]] }
.select { |name, *| name.to_s.include? %w[resize_to_limit strip ...] } # sanitization
ImageProcessing::Vips.apply(operations)
- Record
GHSA-cxf7-qrc5-9446- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-20, CWE-78
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2022-24720
9.8
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.
- Record
UBUNTU-CVE-2022-24720- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUSN-6675-1 No score
ruby-image-processing vulnerability
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.
- Record
USN-6675-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
image_processingRubyGems |
before 1.12.2 | 1.12.2 |
ruby-image-processingDebian:12 |
before 1.10.3-2 | 1.10.3-2 |
ruby-image-processingDebian:11 |
before 1.10.3-1+deb11u1, plus listed versions 1.10.3-1 |
1.10.3-1+deb11u1 |
image_processingRubyGems |
before 1.12.2, plus listed versions 0.10.00.10.10.10.20.10.30.11.0 Show 36 moreShow less0.11.10.11.20.2.10.2.20.2.30.2.40.2.50.3.00.4.00.4.10.4.20.4.30.4.40.4.50.9.01.0.01.1.01.10.01.10.11.10.21.10.31.11.01.12.01.12.11.2.01.3.01.4.01.5.01.6.01.7.01.7.11.8.01.9.01.9.11.9.21.9.3 |
1.12.2 |
ruby-image-processingUbuntu:20.04:LTS |
before 1.10.3-1ubuntu0.20.04.1, plus listed versions 1.10.3-1 |
1.10.3-1ubuntu0.20.04.1 |
ruby-image-processingUbuntu:22.04:LTS |
before 1.10.3-1ubuntu0.22.04.1, plus listed versions 1.10.3-1 |
1.10.3-1ubuntu0.22.04.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-24720 is a critical vulnerability (CVSS 9.8) in Image Processing Project Processing, published March 1, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.69%, the 85th percentile. Fixed in image_processing 1.12.2.
References
github.com/janko/image_processing/security/advisories/GHSA-cxf7-qrc5-9446
github.com/janko/image_processing/commit/038e4574e8f4f4b636a62394e09983c71980dada
debian.org/security/2022/dsa-5310
nvd.nist.gov/vuln/detail/CVE-2022-24720
github.com/rubysec/ruby-advisory-db/blob/master/gems/image_processing/CVE-2022-24720.yml
github.com/advisories/GHSA-cxf7-qrc5-9446