IT SBIT Services
Schneeberger
DEEN
CVE tracker

image_optimizer Ruby gem: OS command injection via identify option

CVE-2026-107704Critical 9.3

← All vulnerabilities

Summary

The image_optimizer Ruby gem versions 1.3.0 through 1.9.0 contain an OS command injection in ImageOptimizer#identify_format. When the identify option is enabled, an image path containing shell metacharacters, such as an uploaded file name, is passed unescaped to a shell command. An attacker who controls the path can run arbitrary commands with the privileges of the Ruby process. The issue requires the identify option and a path influenced by users.

Affected

  • image_optimizer (RubyGems, jtescher) 1.3.0 through 1.9.0
  • Default configuration (identify option disabled) is not affected according to the CVE record.

Fixed in

Unknown. No fixed release is confirmed. 1.9.0 is the latest release listed, and the OSV data is contradictory.

Workaround

  • Disable the identify option.
  • Do not pass user-controlled file names or paths to the gem. Rename uploads to server-generated names before processing.
  • Run the Ruby process with minimal privileges and restricted file-system access.

Exploitation

  • CISA SSVC assessment: exploitation status 'poc', automatable: yes, technical impact: total.
  • A proof-of-concept gist is referenced in the CVE record.
  • No confirmed exploitation in the wild is known.

Our recommendation

  • Inventory Gemfile.lock files for image_optimizer and check whether the identify option is used.
  • Disable identify or remove the gem where it is not required.
  • Keep user-supplied paths away from the gem and monitor for unexpected process execution.
  • Watch for a verified fixed release and update once it is available.

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 31 Oct 2026, 02:56.

Original description (NVD)

The image_optimizer Ruby gem 1.3.0 through 1.9.0 contains an OS command injection vulnerability in ImageOptimizer#identify_format that allows attackers to execute commands by supplying a crafted image path when the identify option is enabled. Attackers controlling the path, such as an uploaded file name, can append shell metacharacters like ';' that are executed via Ruby backticks with the Ruby process privileges.

NVD references (6)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.