Skip to content
OpenAdvisories
Critical · 9.8 CVE-2022-24720 EUVD-2022-1412GHSA-cxf7-qrc5-9446

Improper Input Validation in image_processing

Published Mar 1, 2022 · Updated Apr 22, 2025 · Assigned by GitHub_M

Description

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 products

VendorProductAffectedFixed
janko image_processing < 1.12.2 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 12 ruby-image-processing 1.10.3-2 —
Debian 11 ruby-image-processing 1.10.3-1+deb11u1 DSA-5310-1
ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS ruby-image-processing 1.10.3-1ubuntu0.22.04.1 USN-6675-1
Ubuntu 20.04 LTS ruby-image-processing 1.10.3-1ubuntu0.20.04.1 USN-6675-1

Affected packages

EcosystemPackageAffectedFixedRecord
RubyGems image_processing < 1.12.2 1.12.2 GHSA-cxf7-qrc5-9446

Advisories 2

References