Every CVE Search/ Get API key

CVE-2022-24720

Improper Input Validation in image_processing

9.8 CriticalFix available

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

2.69%Up 1.8 points since Mar 2, 2022
90%50%10%1%

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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
10.0 HighAV: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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

Affected packages
PackageAffectedFixed
image_processing
RubyGems
before 1.12.2
1.12.2
ruby-image-processing
Debian:12
before 1.10.3-2
1.10.3-2
ruby-image-processing
Debian:11
before 1.10.3-1+deb11u1, plus listed versions
1.10.3-1
1.10.3-1+deb11u1
image_processing
RubyGems
before 1.12.2, plus listed versions
0.10.00.10.10.10.20.10.30.11.0
Show 36 moreShow less
0.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-processing
Ubuntu: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-processing
Ubuntu: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

History
RecordedChangedSources
first indexedCVE 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

Show 6 moreShow less
MoveEnter Open