{"id":"CVE-2022-24720","aliases":["DEBIAN-CVE-2022-24720","DSA-5310-1","EUVD-2022-1412","GHSA-cxf7-qrc5-9446","UBUNTU-CVE-2022-24720","USN-6675-1"],"status":"published","title":"Improper Input Validation in image_processing","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.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.02686,"percentile":0.85959,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20","CWE-78"],"published":"2022-03-01T00:00:00Z","modified":"2026-10-28T02:30:58Z","fixes":[{"ecosystem":"RubyGems","package":"image_processing","fixed_in":["1.12.2"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"ruby-image-processing","fixed_in":["1.10.3-2"],"sources":["osv"]},{"ecosystem":"Debian:11","package":"ruby-image-processing","fixed_in":["1.10.3-1+deb11u1"],"sources":["osv"]},{"ecosystem":"Ubuntu:20.04:LTS","package":"ruby-image-processing","fixed_in":["1.10.3-1ubuntu0.20.04.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:22.04:LTS","package":"ruby-image-processing","fixed_in":["1.10.3-1ubuntu0.22.04.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"RubyGems","package":"image_processing","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.12.2"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"ruby-image-processing","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.10.3-2"}]}]},{"source":"osv","ecosystem":"Debian:11","package":"ruby-image-processing","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.10.3-1+deb11u1"}]}],"versions":["1.10.3-1"]},{"source":"osv","ecosystem":"RubyGems","package":"image_processing","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.12.2"}]}],"versions":["0.10.0","0.10.1","0.10.2","0.10.3","0.11.0","0.11.1","0.11.2","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5","0.3.0","0.4.0","0.4.1","0.4.2","0.4.3","0.4.4","0.4.5","0.9.0","1.0.0","1.1.0","1.10.0","1.10.1","1.10.2","1.10.3","1.11.0","1.12.0","1.12.1","1.2.0","1.3.0","1.4.0","1.5.0","1.6.0","1.7.0","1.7.1","1.8.0","1.9.0","1.9.1","1.9.2","1.9.3"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"ruby-image-processing","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.10.3-1ubuntu0.20.04.1"}]}],"versions":["1.10.3-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"ruby-image-processing","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.10.3-1ubuntu0.22.04.1"}]}],"versions":["1.10.3-1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"ruby-image-processing","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.10.3-1ubuntu0.20.04.1"}]}],"versions":["1.10.3-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"ruby-image-processing","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.10.3-1ubuntu0.22.04.1"}]}],"versions":["1.10.3-1"]}],"products":[{"vendor":"debian","product":"debian_linux"},{"vendor":"image_processing_project","product":"image_processing"},{"vendor":"janko","product":"image_processing"}],"references":[{"url":"https://github.com/janko/image_processing/security/advisories/GHSA-cxf7-qrc5-9446","tags":["x_transferred","Exploit","Vendor Advisory","advisory","web","report"]},{"url":"https://github.com/janko/image_processing/commit/038e4574e8f4f4b636a62394e09983c71980dada","tags":["x_transferred","Patch","fix","web","report"]},{"url":"https://www.debian.org/security/2022/dsa-5310","tags":["vendor-advisory","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24720","tags":["advisory"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/image_processing/CVE-2022-24720.yml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-cxf7-qrc5-9446"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24720.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-24720","tags":["advisory"]},{"url":"https://github.com/janko/image_processing","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2022-24720","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-6675-1","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-24720","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2022-24720","title":"Improper Input Validation in image_processing","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.","status":"published","published":"2022-03-01T00:00:00Z","modified":"2025-04-22T18:21:17.8Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"cna"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:34:34.576287Z"}],"euvd":[{"id":"EUVD-2022-1412","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.","status":"published","published":"2022-03-01T00:00:00Z","modified":"2025-04-22T18:21:17Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T20:52:15.026784Z"}],"ghsa":[{"id":"GHSA-cxf7-qrc5-9446","title":"Remote shell execution vulnerability in image_processing","description":"### Impact\n\nWhen 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:\n\n```rb\nImageProcessing::Vips.apply({ system: \"echo EXECUTED\" })\n#\u003e\u003e EXECUTED\n```\n\nThis method is called internally by Active Storage variants, so Active Storage is vulnerable as well.\n\n### Patches\n\nThe vulnerability has been fixed in version 1.12.2 of image_processing.\n\n### Workarounds\n\nIf 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:\n\n```rb\noperations = params[:operations]\n  .map { |operation| [operation[:name], *operation[:value]] }\n  .select { |name, *| name.to_s.include? %w[resize_to_limit strip ...] } # sanitization\n\nImageProcessing::Vips.apply(operations)\n```","status":"published","published":"2022-03-01T22:22:26Z","modified":"2023-05-04T19:29:01Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-20","CWE-78"],"updated_at":"2026-11-02T14:36:52.310293Z"}],"nvd":[{"id":"CVE-2022-24720","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.","status":"published","published":"2022-03-01T23:15:08.993Z","modified":"2026-06-17T04:32:22.093Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"secondary"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":10,"vector":"AV:N/AC:L/Au:N/C:C/I:C/A:C","level":"high","assessor":"primary"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:07:12.711288Z"}],"osv":[{"id":"CVE-2022-24720","title":"Improper Input Validation in image_processing","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.","status":"published","published":"2022-03-01T00:00:00Z","modified":"2026-10-28T02:30:58.056721361Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T15:44:24.428403Z"},{"id":"DEBIAN-CVE-2022-24720","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.","status":"published","published":"2022-03-01T23:15:08.993Z","modified":"2026-11-03T08:01:04.498715845Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-03T08:25:01.007408Z"},{"id":"GHSA-cxf7-qrc5-9446","title":"Remote shell execution vulnerability in image_processing","description":"### Impact\n\nWhen 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:\n\n```rb\nImageProcessing::Vips.apply({ system: \"echo EXECUTED\" })\n#\u003e\u003e EXECUTED\n```\n\nThis method is called internally by Active Storage variants, so Active Storage is vulnerable as well.\n\n### Patches\n\nThe vulnerability has been fixed in version 1.12.2 of image_processing.\n\n### Workarounds\n\nIf 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:\n\n```rb\noperations = params[:operations]\n  .map { |operation| [operation[:name], *operation[:value]] }\n  .select { |name, *| name.to_s.include? %w[resize_to_limit strip ...] } # sanitization\n\nImageProcessing::Vips.apply(operations)\n```","status":"published","published":"2022-03-01T22:22:26Z","modified":"2023-11-08T04:08:33.532528Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-20","CWE-78"],"updated_at":"2026-11-02T15:46:45.639885Z"},{"id":"UBUNTU-CVE-2022-24720","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.","status":"published","published":"2022-03-01T23:15:00Z","modified":"2026-02-04T10:01:02.998337Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T16:53:53.13624Z"},{"id":"DSA-5310-1","title":"ruby-image-processing - security update","status":"published","published":"2022-12-31T00:00:00Z","modified":"2026-03-09T02:08:54.649391Z","updated_at":"2026-11-02T15:46:17.543497Z"},{"id":"USN-6675-1","title":"ruby-image-processing vulnerability","description":"It was discovered that ImageProcessing incorrectly handled series of operations\nthat are coming from unsanitised inputs. If a user or an automated system were\ntricked into opening a specially crafted input file, a remote attacker could\npossibly use this issue to execute arbitrary code. \n","status":"published","published":"2024-03-05T15:57:04Z","modified":"2026-02-10T04:43:31Z","updated_at":"2026-11-02T16:58:17.914523Z"}]}}
