CVE-2022-24720
Ruby vulnerability analysis and mitigation

Overview

CVE-2022-24720 affects image_processing, a wrapper library for libvips and ImageMagick/GraphicsMagick. The vulnerability was discovered in versions prior to 1.12.2, where using the #apply method with unsanitized user input could allow attackers to execute arbitrary shell commands. This vulnerability also affects Active Storage variants since they internally use this method (GitHub Advisory).

Technical details

The vulnerability stems from the improper input validation in the #apply method, which allowed execution of shell commands through Kernel#system and Kernel#spawn. The vulnerability has a CVSS v3.1 Base Score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, indicating remote exploitation with no required privileges or user interaction (NVD).

Impact

If exploited, this vulnerability allows attackers to execute arbitrary shell commands on the target system. This is particularly concerning as Active Storage variants, which internally use the affected method, are also vulnerable. The high severity rating indicates potential for complete system compromise (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in version 1.12.2 of image_processing. As a workaround, users processing based on user input should implement input sanitization by allowing only a constrained set of operations. For example, operations should be filtered to include only legitimate image processing commands like 'resize_to_limit' or 'strip' (GitHub Advisory, Debian Advisory).

Additional resources


SourceThis report was generated using AI

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-68271CRITICAL10
  • RubyRuby
  • openc3
NoYesJan 13, 2026
CVE-2026-22589HIGH7.5
  • RubyRuby
  • spree_core
NoYesJan 10, 2026
GHSA-96qw-h329-v5rgHIGH7.5
  • JavaScriptJavaScript
  • shakapacker
NoYesJan 08, 2026
CVE-2026-22588MEDIUM6.5
  • RubyRuby
  • spree_api
NoYesJan 08, 2026
GHSA-g9jg-w8vm-g96vMEDIUM4.6
  • JavaScriptJavaScript
  • action_text-trix
NoYesDec 31, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management