CVE-2009-4492: Input Validation
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
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rubygems/webrickto a version that resolves this vulnerability.Fixed in 1.4.0 - Compensating control
Avoid viewing WEBrick logs in a terminal until the WEBrick process is updated.
Event History
Frequently Asked Questions
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.
How do I fix CVE-2009-4492?
To fix CVE-2009-4492, upgrade WEBrick to version 1.4.0 or later.
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.
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.
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.