Loading...
Skip to main content

CVE-2022-24720 — Remote shell execution vulnerability in...

CRITICAL

Remote shell execution vulnerability in image_processing

Published March 1, 2022Updated November 8, 2023Source: osv

Summary

### 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[:value]] } .select { |name, *| name.to_s.include? %w[resize_to_limit strip ...] } # sanitization ImageProcessing::Vips.apply(operations) ```

Advisory Timeline

  • First published March 1, 2022 (1686 days ago).
  • Last revised November 8, 2023 — 616 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update image_processing to 1.12.2 or later
gem install image_processing -v 1.12.2

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
image_processing
rubygems
0.10.0, 0.10.1, 0.10.2, 0.10.3 (+37 more)1.12.2

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-20
    Improper Input ValidationMITRE
  • CWE-78
    OS Command InjectionMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2022-24720?
Remote shell execution vulnerability in image_processing This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2022-24720?
CVE-2022-24720 affects image_processing. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2022-24720 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-cxf7-qrc5-9446

Related CVEs

  • CVE-2026-55107
    CRITICAL

    kobako Sandbox Escape: guest eval reaches host RCE via method_missing → public_send (any bound Service)

  • CVE-2026-77602
    CRITICAL

    OpenC3 COSMOS: Authenticated remote code execution via the user-writable config overlay (table definitions, cmd/tlm definitions, and script suites)

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies