[#46732] ヒアドキュメント内の変数展開が正常に行われない — ShingoKintaka <kamuycikap@...>

Ruby  :1.8.7 (Ubuntu9.10)

12 messages 2010/01/05
[#46733] Re: ヒアドキュメント内の変数展開が正常に行われない — rubikitch@... 2010/01/06

From: ShingoKintaka <kamuycikap@tulip.ocn.ne.jp>

[#46800] DLモジュールの使い方 — kouichi_someya@...

染谷と申します。

12 messages 2010/01/20
[#47678] プログラム実行時に「[BUG] Segmentation fault」 — 染谷 康一 <kouichi_someya@...> 2010/12/09

染谷と申します。

[ruby-list:46755] [Security] WEBrick has an Escape Sequence Injection vulnerability

From: Urabe Shyouhei <shyouhei@...>
Date: 2010-01-10 09:41:08 UTC
List: ruby-list #46755
WEBrick has an Escape Sequence Injection vulnerability
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D

Synopsis
--------

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 y=
our
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 seque=
nces
are not intended to be issued by untrusted sources; such as network input=
s. 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 coul=
d take
advantages of various weaknesses in terminal emulators[1].

And WEBrick fails to filter those terminal escape sequences.

Example:

    % xterm -e ruby -rwebrick -e 'WEBrick::HTTPServer.new(:Port=3D>8080).=
start' &
    % wget http://localhost:8080/%1b%5d%32%3b%6f%77%6e%65%64%07%0a


Watch out for the window title of xterm.

Affected versions
-----------------

* Ruby 1.8.6 patchlevel 383 and all prior versions
* Ruby 1.8.7 patchlevel 248 and all prior versions
* Development versions of Ruby 1.8 (1.8.8dev)
* Ruby 1.9.1 patchlevel 376 and all prior versions
* Development versions of Ruby 1.9 (1.9.2dev)

Solutions
---------

* Fixes for 1.8.6, 1.8.7, and 1.9.1 are to follow this announce.
* For development versions, please update to the most recent revision for=
 each
development branch.

Credit
------

Credit to Giovanni "evilaliv3" Pellerano, Alessandro "jekil" Tanasi, and
Francesco "ascii" Ongaro for discovering this vulnerability.


[1] http://marc.info/?l=3Dbugtraq&m=3D104612710031920&w=3D2
    "Terminal Emulator Security Issues"


Attachments (1)

signature.asc (260 Bytes, application/pgp-signature)

In This Thread

Prev Next