{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "1.3.0"
              },
              {
                "last_affected": "1.9.0"
              },
              {
                "fixed": "1.9.0"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "DESCRIPTION"
            ]
          },
          "events": [
            {
              "introduced": "185be837597be715637e9dab6b6ef8d1c47bcc01"
            },
            {
              "fixed": "07548c6499186e3bd100aae7026d6aead3902327"
            }
          ],
          "repo": "https://github.com/jtescher/image_optimizer",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-78"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/107xxx/CVE-2026-107704.json"
  },
  "details": "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.",
  "id": "CVE-2026-107704",
  "modified": "2026-10-11T02:30:59.648453560Z",
  "published": "2026-10-08T18:36:37.394Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://rubygems.org/gems/image_optimizer"
    },
    {
      "type": "ADVISORY",
      "url": "https://gist.github.com/R3tro16/a99a058d24a06692721a6a3fade9649d"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/107xxx/CVE-2026-107704.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-107704"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/image-optimizer-1.3.0-through-1.9.0-os-command-injection-via-identify-format"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/jtescher/image_optimizer"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/jtescher/image_optimizer/blob/v1.9.0/lib/image_optimizer.rb#L37-L47"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/jtescher/image_optimizer/blob/v1.9.0/lib/image_optimizer/shell.rb#L30-L32"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "image_optimizer 1.3.0 through 1.9.0 OS Command Injection via identify_format"
}