{"id":"CVE-2016-2337","aliases":["CLSA-2025-1759222758","DLA-1480-1","EUVD-2016-3421","GHSA-f58m-77qc-8gjv","MGASA-2017-0290","UBUNTU-CVE-2016-2337","USN-3365-1"],"status":"published","title":"Type confusion exists in _cancel_eval Ruby's TclTkIp class method. Attacker passing different...","description":"Type confusion exists in _cancel_eval Ruby's TclTkIp class method. Attacker passing different type of object than String as \"retval\" argument can cause arbitrary code execution.","severity":{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.06153,"percentile":0.93518,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2017-01-06T00:00:00Z","modified":"2026-10-24T10:30:32Z","fixes":[{"ecosystem":"Ubuntu:14.04:LTS","package":"ruby1.9.1","fixed_in":["1.9.3.484-2ubuntu1.3"],"sources":["osv"]},{"ecosystem":"Ubuntu:14.04:LTS","package":"ruby2.0","fixed_in":["2.0.0.484-1ubuntu2.4"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"TuxCare:CentOS:7","package":"ruby","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0.648-39.el7_9.tuxcare.els11"}]}],"bundled":4},{"source":"osv","ecosystem":"TuxCare:CentOS:7","package":"ruby-devel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0.648-39.el7_9.tuxcare.els11"}]}],"bundled":4},{"source":"osv","ecosystem":"TuxCare:CentOS:7","package":"ruby-doc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0.648-39.el7_9.tuxcare.els11"}]}],"bundled":4},{"source":"osv","ecosystem":"TuxCare:CentOS:7","package":"ruby-irb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0.648-39.el7_9.tuxcare.els11"}]}],"bundled":4},{"source":"osv","ecosystem":"TuxCare:CentOS:7","package":"ruby-libs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0.648-39.el7_9.tuxcare.els11"}]}],"bundled":4},{"source":"osv","ecosystem":"TuxCare:CentOS:7","package":"ruby-tcltk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0.648-39.el7_9.tuxcare.els11"}]}],"bundled":4},{"source":"osv","ecosystem":"TuxCare:CentOS:7","package":"rubygem-bigdecimal","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.0-39.el7_9.tuxcare.els11"}]}],"bundled":4},{"source":"osv","ecosystem":"TuxCare:CentOS:7","package":"rubygem-io-console","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.4.2-39.el7_9.tuxcare.els11"}]}],"bundled":4},{"source":"osv","ecosystem":"TuxCare:CentOS:7","package":"rubygem-json","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.7.7-39.el7_9.tuxcare.els11"}]}],"bundled":4},{"source":"osv","ecosystem":"TuxCare:CentOS:7","package":"rubygem-minitest","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.2-39.el7_9.tuxcare.els11"}]}],"bundled":4},{"source":"osv","ecosystem":"TuxCare:CentOS:7","package":"rubygem-psych","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0-39.el7_9.tuxcare.els11"}]}],"bundled":4},{"source":"osv","ecosystem":"TuxCare:CentOS:7","package":"rubygem-rake","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.6-39.el7_9.tuxcare.els11"}]}],"bundled":4},{"source":"osv","ecosystem":"TuxCare:CentOS:7","package":"rubygem-rdoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.0.0-39.el7_9.tuxcare.els11"}]}],"bundled":4},{"source":"osv","ecosystem":"TuxCare:CentOS:7","package":"rubygems","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.14.1-39.el7_9.tuxcare.els11"}]}],"bundled":4},{"source":"osv","ecosystem":"TuxCare:CentOS:7","package":"rubygems-devel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.14.1-39.el7_9.tuxcare.els11"}]}],"bundled":4},{"source":"osv","ecosystem":"Debian:8","package":"ruby2.1","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.5-2+deb8u5"}]}],"versions":["2.1.5-2","2.1.5-2+deb8u1","2.1.5-2+deb8u2","2.1.5-2+deb8u3","2.1.5-2+deb8u4"],"bundled":3},{"source":"osv","ecosystem":"Mageia:5","package":"ruby","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0.p648-1.4.mga5"}]}],"bundled":3},{"source":"osv","ecosystem":"Mageia:6","package":"ruby","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.7-1.mga6"}]}],"bundled":3},{"source":"osv","ecosystem":"Ubuntu:14.04:LTS","package":"ruby1.9.1","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.9.3.484-2ubuntu1.3"}]}],"versions":["1.9.3.194-8.1ubuntu2","1.9.3.448-1ubuntu1","1.9.3.448-1ubuntu2","1.9.3.484-1ubuntu1","1.9.3.484-1ubuntu2","1.9.3.484-2ubuntu1","1.9.3.484-2ubuntu1.1","1.9.3.484-2ubuntu1.2"]},{"source":"osv","ecosystem":"Ubuntu:14.04:LTS","package":"ruby2.0","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0.484-1ubuntu2.4"}]}],"versions":["2.0.0.299-2","2.0.0.343-1","2.0.0.343-1ubuntu1","2.0.0.353-1","2.0.0.353-1ubuntu1","2.0.0.484-1ubuntu1","2.0.0.484-1ubuntu2","2.0.0.484-1ubuntu2.1","2.0.0.484-1ubuntu2.2"]},{"source":"osv","ecosystem":"Ubuntu:14.04:LTS","package":"ruby1.9.1","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.9.3.484-2ubuntu1.3"}]}],"versions":["1.9.3.194-8.1ubuntu2","1.9.3.448-1ubuntu1","1.9.3.448-1ubuntu2","1.9.3.484-1ubuntu1","1.9.3.484-1ubuntu2","1.9.3.484-2ubuntu1","1.9.3.484-2ubuntu1.1","1.9.3.484-2ubuntu1.2"],"bundled":7},{"source":"osv","ecosystem":"Ubuntu:14.04:LTS","package":"ruby2.0","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0.484-1ubuntu2.4"}]}],"versions":["2.0.0.299-2","2.0.0.343-1","2.0.0.343-1ubuntu1","2.0.0.353-1","2.0.0.353-1ubuntu1","2.0.0.484-1ubuntu1","2.0.0.484-1ubuntu2","2.0.0.484-1ubuntu2.1","2.0.0.484-1ubuntu2.2"],"bundled":7},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"ruby2.3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.3.1-2~16.04.2"}]}],"versions":["2.3.0-1","2.3.0-2","2.3.0-4ubuntu2","2.3.0-4ubuntu3","2.3.0-5ubuntu1","2.3.1-2~16.04"],"bundled":7}],"products":[{"vendor":"hackerone","product":"ruby"},{"vendor":"ruby","product":"ruby"},{"vendor":"ruby-lang","product":"ruby"},{"vendor":"tcl","product":"tcl/tk"}],"references":[{"url":"http://www.talosintelligence.com/reports/TALOS-2016-0031/","tags":["x_refsource_MISC","x_transferred","Exploit","Technical Description","Third Party Advisory","VDB Entry","evidence","report"]},{"url":"http://www.securityfocus.com/bid/91233","tags":["vdb-entry","x_refsource_BID","x_transferred","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2018/08/msg00028.html","tags":["mailing-list","x_refsource_MLIST","x_transferred","web"]},{"url":"https://security.gentoo.org/glsa/201710-18","tags":["vendor-advisory","x_refsource_GENTOO","x_transferred","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2016-2337"},{"url":"http://www.talosintelligence.com/reports/TALOS-2016-0031"},{"url":"https://github.com/advisories/GHSA-f58m-77qc-8gjv"},{"url":"https://errata.tuxcare.com/els_os/centos7els/CLSA-2025-1759222758.html","tags":["advisory"]},{"url":"https://advisories.mageia.org/MGASA-2017-0290.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=20625","tags":["report"]},{"url":"https://usn.ubuntu.com/usn/usn-3365-1/","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2016-2337","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-3365-1","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2016-2337","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2009-5147","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2015-1855","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2015-7551","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2015-9096","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2016-2339","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2016-7798","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2016-2337","description":"Type confusion exists in _cancel_eval Ruby's TclTkIp class method. Attacker passing different type of object than String as \"retval\" argument can cause arbitrary code execution.","status":"published","published":"2017-01-06T21:00:00Z","modified":"2024-08-05T23:24:49.158Z","updated_at":"2026-11-02T14:33:33.07583Z"}],"euvd":[{"id":"EUVD-2016-3421","description":"Type confusion exists in _cancel_eval Ruby's TclTkIp class method. Attacker passing different type of object than String as \"retval\" argument can cause arbitrary code execution.","status":"published","published":"2017-01-06T21:00:00Z","modified":"2024-08-05T23:24:49Z","updated_at":"2026-11-03T02:22:53.601545Z"}],"ghsa":[{"id":"GHSA-f58m-77qc-8gjv","title":"Type confusion exists in _cancel_eval Ruby's TclTkIp class method. Attacker passing different...","description":"Type confusion exists in _cancel_eval Ruby's TclTkIp class method. Attacker passing different type of object than String as \"retval\" argument can cause arbitrary code execution.","status":"published","published":"2022-05-14T03:04:23Z","modified":"2025-04-20T03:31:52Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:01:38.976438Z"}],"nvd":[{"id":"CVE-2016-2337","description":"Type confusion exists in _cancel_eval Ruby's TclTkIp class method. Attacker passing different type of object than String as \"retval\" argument can cause arbitrary code execution.","status":"published","published":"2017-01-06T21:59:00.46Z","modified":"2026-06-17T00:43:50.917Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"updated_at":"2026-11-02T14:03:33.686843Z"}],"osv":[{"id":"CVE-2016-2337","description":"Type confusion exists in _cancel_eval Ruby's TclTkIp class method. Attacker passing different type of object than String as \"retval\" argument can cause arbitrary code execution.","status":"published","published":"2017-01-06T21:59:00.46Z","modified":"2026-10-24T10:30:32.981003138Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:02.114472Z"},{"id":"UBUNTU-CVE-2016-2337","description":"Type confusion exists in _cancel_eval Ruby's TclTkIp class method. Attacker passing different type of object than String as \"retval\" argument can cause arbitrary code execution.","status":"published","published":"2017-01-06T00:00:00Z","modified":"2026-04-22T10:37:11.91001Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:54:11.872222Z"},{"id":"CLSA-2025-1759222758","title":"ruby: Fix of 4 CVEs","description":"- CVE-2016-2337: Fix type confusion in _cancel_eval Ruby's TclTkIp class method\n  to prevent arbitrary code execution\n- CVE-2017-9224: Fix stack out-of-bounds read in match_at() during regular\n  expression searching\n- CVE-2017-9227: Fix stack out-of-bounds read in mbc_enc_len() and invalid\n  pointer dereference in  forward_search_range()\n- CVE-2017-9228: Fix heap out-of-bounds write in bitset_set_range() and\n  parse_char_class() by initializing critical local variable","status":"published","published":"2025-09-30T08:59:21Z","modified":"2026-06-01T00:33:18.223080288Z","updated_at":"2026-11-02T15:43:42.427288Z"},{"id":"DLA-1480-1","title":"ruby2.1 - security update","status":"published","published":"2018-08-27T00:00:00Z","modified":"2026-03-09T01:01:31.888389Z","updated_at":"2026-11-02T15:46:09.777694Z"},{"id":"MGASA-2017-0290","title":"Updated ruby packages fix security vulnerabilities","description":"It was discovered that Ruby Net::SMTP incorrectly handled CRLF\nsequences. A remote attacker could possibly use this issue to inject\nSMTP commands. (CVE-2015-9096)\n\nMarcin Noga discovered that Ruby incorrectly handled certain arguments\nin a TclTkIp class method. An attacker could possibly use this issue to\nexecute arbitrary code. This issue only affected Ubuntu 14.04 LTS.\n(CVE-2016-2337)\n\nIt was discovered that Ruby Fiddle::Function.new incorrectly handled\ncertain arguments. An attacker could possibly use this issue to execute\narbitrary code. This issue only affected Ubuntu 14.04 LTS.\n(CVE-2016-2339)\n","status":"published","published":"2017-08-20T09:10:44Z","modified":"2026-04-16T06:26:07.384912092Z","updated_at":"2026-11-02T15:49:40.442238Z"},{"id":"USN-3365-1","title":"ruby1.9.1, ruby2.0, ruby2.3 vulnerabilities","description":"It was discovered that Ruby DL::dlopen incorrectly handled opening\nlibraries. An attacker could possibly use this issue to open libraries with\ntainted names. This issue only applied to Ubuntu 14.04 LTS. (CVE-2009-5147)\n\nTony Arcieri, Jeffrey Walton, and Steffan Ullrich discovered that the Ruby\nOpenSSL extension incorrectly handled hostname wildcard matching. This\nissue only applied to Ubuntu 14.04 LTS. (CVE-2015-1855)\n\nChristian Hofstaedtler discovered that Ruby Fiddle::Handle incorrectly\nhandled certain crafted strings. An attacker could use this issue to cause\na denial of service, or possibly execute arbitrary code. This issue only\napplied to Ubuntu 14.04 LTS. (CVE-2015-7551)\n\nIt was discovered that Ruby Net::SMTP incorrectly handled CRLF sequences. A\nremote attacker could possibly use this issue to inject SMTP commands.\n(CVE-2015-9096)\n\nMarcin Noga discovered that Ruby incorrectly handled certain arguments in\na TclTkIp class method. An attacker could possibly use this issue to\nexecute arbitrary code. This issue only affected Ubuntu 14.04 LTS.\n(CVE-2016-2337)\n\nIt was discovered that Ruby Fiddle::Function.new incorrectly handled\ncertain arguments. An attacker could possibly use this issue to execute\narbitrary code. This issue only affected Ubuntu 14.04 LTS. (CVE-2016-2339)\n\nIt was discovered that Ruby incorrectly handled the initialization vector\n(IV) in GCM mode. An attacker could possibly use this issue to bypass\nencryption. (CVE-2016-7798)\n","status":"published","published":"2017-07-25T17:52:34Z","modified":"2026-04-27T15:17:29.906084053Z","updated_at":"2026-11-02T16:58:13.496563Z"}]}}
