CVE-2009-4492: Input Validation

Published Jan 11, 2010
·
Updated

A vulnerability was found on WEBrick, a part of Ruby's standard library. WEBrick lets attackers to inject malicious escape sequences to its logs, making it possible for dangerous control characters to be executed on a victim's terminal emulator.

We already have a fix for it. Releases for every active branches are to follow this announce. But for a meantime, we recommend you to avoid looking at your WEBrick logs, until you update your WEBrick process. Detailed description

Terminal escape sequences are used to allow various forms of interaction between a terminal and a inside process. The problem is that those sequences are not intended to be issued by untrusted sources; such as network inputs. So if a remote attacker could inject escape sequences into WEBrick logs, and a victim happen to consult them through his/her terminal, the attacker could take advantages of various weaknesses in terminal emulators.

http://www.ruby-lang.org/en/news/2010/01/10/webrick-escape-sequence-injection/

Other sources

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.

Affected Software

9 affected componentsFixes available
ruby-lang Webrick Ruby=1.3.1
ruby-lang Ruby>=1.8.6<=1.8.6.383
ruby-lang Ruby>=1.8.7<=1.8.7.248
ruby-lang Ruby>=1.9.1<=1.9.1.376
rubygems/webrick<=1.3.1
1.4.0
All of the following
ruby-lang Webrick Ruby=1.3.1
Any of the following
ruby-lang Ruby>=1.8.6<=1.8.6.383
ruby-lang Ruby>=1.8.7<=1.8.7.248
ruby-lang Ruby>=1.9.1<=1.9.1.376

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rubygems/webrick to a version that resolves this vulnerability.

    Fixed in 1.4.0
  2. Compensating control

    Avoid viewing WEBrick logs in a terminal until the WEBrick process is updated.

Event History

Jan 11, 2010
Data Sourced
via Red Hat·08:19 PM
DescriptionSeverityAffected Software
Jan 13, 2010
CVE Published
via MITRE·08:00 PM
Data Sourced
via MITRE·08:00 PM
Description
Data Sourced
08:30 PM
DescriptionWeaknessAffected Software
Data Sourced
08:30 PM
RemedySeverity
Oct 24, 2017
Advisory Published
06:33 PM
Apr 9, 2025
Data Sourced
via NVD·12:30 AM
RemedyDescriptionSeverityAffected Software
Updated
via NVD·12:30 AM
RemedyAffected Software
May 22, 2025
Advisory Published
via GitHub·04:55 PM
Data Sourced
via GitHub·04:55 PM
DescriptionWeaknessAffected Software
Jun 16, 2026
Updated
via NVD·11:13 PM
Affected Software

Frequently Asked Questions

1

What is the severity of CVE-2009-4492?

CVE-2009-4492 is considered to have a moderate severity level due to the potential for remote exploitation.

2

How do I fix CVE-2009-4492?

To fix CVE-2009-4492, upgrade WEBrick to version 1.4.0 or later.

3

Which versions of WEBrick are affected by CVE-2009-4492?

WEBrick versions up to and including 1.3.1 are affected by CVE-2009-4492.

4

What types of attacks can CVE-2009-4492 enable?

CVE-2009-4492 might allow remote attackers to modify a window's title or potentially execute arbitrary commands.

5

Is any version of Ruby affected by CVE-2009-4492?

Yes, Ruby versions 1.8.6 through patchlevel 383, 1.8.7 through patchlevel 248, 1.9.1 through patchlevel 376 are affected by CVE-2009-4492.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203