{"id":"CVE-2009-4492","aliases":["EUVD-2017-0178","GHSA-6mq2-37j5-w6r6","RHSA-2011:0908","RHSA-2011:0909"],"status":"published","title":"WEBrick Improper Input Validation vulnerability","description":"WEBrick 1.3.1 in Ruby 1.8.6 through patchlevel 383, 1.8.7 through patchlevel 248, 1.8.8dev, 1.9.1 through patchlevel 376, and 1.9.2dev writes data to a log file without sanitizing non-printable characters, which might allow remote attackers to modify a window's title, or possibly execute arbitrary commands or overwrite files, via an HTTP request containing an escape sequence for a terminal emulator.","severity":{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-10","score":0.1623,"percentile":0.96971,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-20"],"published":"2010-01-13T20:00:00Z","modified":"2026-06-26T10:16:23Z","exploits":[{"source":"exploitdb","id":"EDB-33489","title":"Ruby 1.9.1 - WEBrick 'Terminal Escape Sequence in Logs' Command Injection","type":"remote","platform":"multiple","date":"2010-01-11","verified":true,"url":"https://www.exploit-db.com/exploits/33489"}],"fixes":[{"ecosystem":"RubyGems","package":"webrick","fixed_in":["1.4.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"RubyGems","package":"webrick","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.3.1"},{"fixed":"1.4.0"}]}]},{"source":"osv","ecosystem":"RubyGems","package":"webrick","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.0"}]}],"versions":["1.3.1","1.4.0.beta1"]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::as","package":"irb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::as","package":"ruby","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::as","package":"ruby-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::as","package":"ruby-devel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::as","package":"ruby-docs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::as","package":"ruby-libs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::as","package":"ruby-mode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::as","package":"ruby-tcltk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::desktop","package":"irb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::desktop","package":"ruby","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::desktop","package":"ruby-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::desktop","package":"ruby-devel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::desktop","package":"ruby-docs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::desktop","package":"ruby-libs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::desktop","package":"ruby-mode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::desktop","package":"ruby-tcltk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::es","package":"irb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::es","package":"ruby","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::es","package":"ruby-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::es","package":"ruby-devel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::es","package":"ruby-docs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::es","package":"ruby-libs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::es","package":"ruby-mode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::es","package":"ruby-tcltk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::ws","package":"irb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::ws","package":"ruby","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::ws","package":"ruby-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::ws","package":"ruby-devel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::ws","package":"ruby-docs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::ws","package":"ruby-libs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::ws","package":"ruby-mode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:4::ws","package":"ruby-tcltk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.1-16.el4"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:5::server","package":"ruby","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.5-19.el5_6.1"}]}],"bundled":5},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:5::server","package":"ruby-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.5-19.el5_6.1"}]}],"bundled":5},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:5::server","package":"ruby-devel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.5-19.el5_6.1"}]}],"bundled":5},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:5::server","package":"ruby-docs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.5-19.el5_6.1"}]}],"bundled":5},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:5::server","package":"ruby-irb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.5-19.el5_6.1"}]}],"bundled":5},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:5::server","package":"ruby-libs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.5-19.el5_6.1"}]}],"bundled":5},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:5::server","package":"ruby-mode","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.5-19.el5_6.1"}]}],"bundled":5},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:5::server","package":"ruby-rdoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.5-19.el5_6.1"}]}],"bundled":5},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:5::server","package":"ruby-ri","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.5-19.el5_6.1"}]}],"bundled":5},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:5::server","package":"ruby-tcltk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.8.5-19.el5_6.1"}]}],"bundled":5}],"products":[{"vendor":"ruby-lang","product":"webrick"}],"references":[{"url":"http://www.ruby-lang.org/en/news/2010/01/10/webrick-escape-sequence-injection","tags":["x_refsource_CONFIRM","x_transferred","Patch","Vendor Advisory","web"]},{"url":"http://www.redhat.com/support/errata/RHSA-2011-0909.html","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred","Third Party Advisory","web"]},{"url":"http://secunia.com/advisories/37949","tags":["third-party-advisory","x_refsource_SECUNIA","x_transferred","Not Applicable","Vendor Advisory"]},{"url":"http://www.vupen.com/english/advisories/2010/0089","tags":["vdb-entry","x_refsource_VUPEN","x_transferred","Permissions Required"]},{"url":"http://www.redhat.com/support/errata/RHSA-2011-0908.html","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred","Third Party Advisory","web"]},{"url":"http://www.ush.it/team/ush/hack_httpd_escape/adv.txt","tags":["x_refsource_MISC","x_transferred","Broken Link","Exploit","web"]},{"url":"http://www.securityfocus.com/bid/37710","tags":["vdb-entry","x_refsource_BID","x_transferred","Broken Link","Exploit","Third Party Advisory","VDB Entry"]},{"url":"http://www.securityfocus.com/archive/1/508830/100/0/threaded","tags":["mailing-list","x_refsource_BUGTRAQ","x_transferred","Broken Link","Third Party Advisory","VDB Entry"]},{"url":"http://securitytracker.com/id?1023429","tags":["vdb-entry","x_refsource_SECTRACK","x_transferred","Broken Link","Exploit","Third Party Advisory","VDB Entry"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2009-4492","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-6mq2-37j5-w6r6","tags":["advisory"]},{"url":"https://web.archive.org/web/20100113155532/http://www.vupen.com/english/advisories/2010/0089","tags":["web"]},{"url":"https://web.archive.org/web/20100815010948/http://secunia.com/advisories/37949","tags":["web"]},{"url":"https://web.archive.org/web/20170402100552/http://securitytracker.com/id?1023429","tags":["web"]},{"url":"https://web.archive.org/web/20170908140655/http://www.securityfocus.com/archive/1/508830/100/0/threaded","tags":["web"]},{"url":"https://web.archive.org/web/20200228145937/http://www.securityfocus.com/bid/37710","tags":["web"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/webrick/CVE-2009-4492.yml","tags":["web"]},{"url":"https://github.com/ruby/webrick","tags":["package"]},{"url":"https://access.redhat.com/errata/RHSA-2011:0908","tags":["advisory"]},{"url":"https://access.redhat.com/security/updates/classification/#moderate","tags":["article"]},{"url":"http://www.ruby-lang.org/en/news/2011/02/18/exception-methods-can-bypass-safe/","tags":["article"]},{"url":"http://www.ruby-lang.org/en/news/2010/01/10/webrick-escape-sequence-injection/","tags":["article"]},{"url":"http://www.ruby-lang.org/en/news/2010/08/16/xss-in-webrick-cve-2010-0541/","tags":["article"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=554485","tags":["report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=587731","tags":["report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=678920","tags":["report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=682332","tags":["report"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2011/rhsa-2011_0908.json","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2009-4492","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2009-4492","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2010-0541","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2010-0541","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2010-0541","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2011-0188","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2011-0188","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2011-0188","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2011-1005","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2011-1005","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2011-1005","tags":["advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2011:0909","tags":["advisory"]},{"url":"http://www.ruby-lang.org/en/news/2011/02/18/fileutils-is-vulnerable-to-symlink-race-attacks/","tags":["article"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=678913","tags":["report"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2011/rhsa-2011_0909.json","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2011-1004","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2011-1004","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2011-1004","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2009-4492","description":"WEBrick 1.3.1 in Ruby 1.8.6 through patchlevel 383, 1.8.7 through patchlevel 248, 1.8.8dev, 1.9.1 through patchlevel 376, and 1.9.2dev writes data to a log file without sanitizing non-printable characters, which might allow remote attackers to modify a window's title, or possibly execute arbitrary commands or overwrite files, via an HTTP request containing an escape sequence for a terminal emulator.","status":"published","published":"2010-01-13T20:00:00Z","modified":"2024-08-07T07:01:20.327Z","updated_at":"2026-11-02T14:33:24.451733Z"}],"euvd":[{"id":"EUVD-2017-0178","description":"WEBrick 1.3.1 in Ruby 1.8.6 through patchlevel 383, 1.8.7 through patchlevel 248, 1.8.8dev, 1.9.1 through patchlevel 376, and 1.9.2dev writes data to a log file without sanitizing non-printable characters, which might allow remote attackers to modify a window's title, or possibly execute arbitrary commands or overwrite files, via an HTTP request containing an escape sequence for a terminal emulator.","status":"published","published":"2010-01-13T20:00:00Z","modified":"2024-08-07T07:01:20Z","updated_at":"2026-11-03T01:39:10.134983Z"}],"ghsa":[{"id":"GHSA-6mq2-37j5-w6r6","title":"WEBrick Improper Input Validation vulnerability","description":"WEBrick 1.3.1 in Ruby 1.8.6 through patchlevel 383, 1.8.7 through patchlevel 248, 1.8.8dev, 1.9.1 through patchlevel 376, and 1.9.2dev writes data to a log file without sanitizing non-printable characters, which might allow remote attackers to modify a window's title, or possibly execute arbitrary commands or overwrite files, via an HTTP request containing an escape sequence for a terminal emulator.","status":"published","published":"2017-10-24T18:33:38Z","modified":"2025-05-22T16:55:40Z","cwes":["CWE-20"],"updated_at":"2026-11-02T14:38:43.998596Z"}],"nvd":[{"id":"CVE-2009-4492","description":"WEBrick 1.3.1 in Ruby 1.8.6 through patchlevel 383, 1.8.7 through patchlevel 248, 1.8.8dev, 1.9.1 through patchlevel 376, and 1.9.2dev writes data to a log file without sanitizing non-printable characters, which might allow remote attackers to modify a window's title, or possibly execute arbitrary commands or overwrite files, via an HTTP request containing an escape sequence for a terminal emulator.","status":"published","published":"2010-01-13T20:30:00.53Z","modified":"2026-06-16T23:13:46.207Z","cvss":[{"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:01:38.33745Z"}],"osv":[{"id":"GHSA-6mq2-37j5-w6r6","title":"WEBrick Improper Input Validation vulnerability","description":"WEBrick 1.3.1 in Ruby 1.8.6 through patchlevel 383, 1.8.7 through patchlevel 248, 1.8.8dev, 1.9.1 through patchlevel 376, and 1.9.2dev writes data to a log file without sanitizing non-printable characters, which might allow remote attackers to modify a window's title, or possibly execute arbitrary commands or overwrite files, via an HTTP request containing an escape sequence for a terminal emulator.","status":"published","published":"2017-10-24T18:33:38Z","modified":"2025-05-22T17:48:00.252889Z","cwes":["CWE-20"],"updated_at":"2026-11-02T15:46:39.965326Z"},{"id":"RHSA-2011:0908","title":"Red Hat Security Advisory: ruby security update","status":"published","published":"2024-09-15T19:10:05Z","modified":"2026-06-26T10:16:23Z","updated_at":"2026-11-02T15:53:01.003286Z"},{"id":"RHSA-2011:0909","title":"Red Hat Security Advisory: ruby security update","status":"published","published":"2024-09-15T19:10:09Z","modified":"2026-05-09T10:01:27Z","updated_at":"2026-11-02T15:53:01.003286Z"}]}}
