Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 111836 - net-misc/asterisk vmail.cgi hole
Summary: net-misc/asterisk vmail.cgi hole
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Security
URL: http://www.assurance.com.au/advisorie...
Whiteboard: B4 [noglsa] jaervosz
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-07 20:13 UTC by Rajiv Aaron Manglani (RETIRED)
Modified: 2005-11-14 01:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
vmail.cgi.patch (for older installs) (vmail.cgi.patch,919 bytes, patch)
2005-11-08 08:02 UTC, solar (RETIRED)
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rajiv Aaron Manglani (RETIRED) gentoo-dev 2005-11-07 20:13:14 UTC
Assurance.com.au - Vulnerability Advisory
-----------------------------------------------
Release Date:
 07-Nov-2005

Software:
 Asterisk Web-VoiceMail (Comedian VoiceMail)
 http://www.asterisk.org/

 Asterisk is a complete PBX in software. It runs on Linux, BSD and MacOSX and 
 provides all of the features you would expect from a PBX and more. 
 Asterisk does voice over IP in many protocols, and can interoperate with almost
 all standards-based telephony equipment using relatively inexpensive hardware.

Versions affected:
 Asterisk Versions <= 1.0.9
 Asterisk Beta Versions <= 1.2.0-beta1
 Asterisk @ Home Versions <= 1.5
 Asterisk @ Home Beta Versions <= 2.0 Beta 4 


Vulnerability discovered:

 A vulnerability in the voicemail retrieval system allows an authenticated
 user to download any .wav/.WAV file from the system, including other
 users voicemail messages.

Vulnerability impact:

 Low - Insecure web-ui causes breach of privacy

Vulnerability information

 vmail.cgi doesn't clean a parameter passed by the web user which is
 later used to open a file and return a raw stream to the user.
 This allows any authenticated user of the voicemail system to listen to
 other peoples messages, or to open any file with the extension .wav/.WAV
 on the system.

 Example:
  http://asterisk.example.org/cgi-bin/vmail.cgi?action=audio& \
  folder=../201/INBOX&mailbox=200&context=default&password=12345 \
  &msgid=0001&format=wav

 This will return /var/spool/asterisk/voicemail/default/201/INBOX/msg0001.wav
 when logged in as the 'extension 200' user.

Solution:
 Asterisk has released patches for the vulnerabilities.
 Ensure you are running Asterisk versions > 1.0.9 / 1.2.0-beta1
 Ensure you are running Asterisk @ Home versions > 1.5 / 2.0 beta 4

References:
 Assurance.com.au advisory
 http://www.assurance.com.au/advisories/200511-asterisk.txt

 Asterisk advisory note
 http://www.asterisk.org/changelog

Credit:
 Adam Pointon of Assurance.com.au
 http://www.assurance.com.au/

Disclosure timeline:
 17-Oct-2005 - Discovered during a quick audit of the asterisk web ui
 18-Oct-2005 - Email sent to support and the primary author
 18-Oct-2005 - Immediate response received
 31-Oct-2005 - Patched version committed to CVS
 07-Nov-2005 - Advisory released

About us:
 Assurance.com.au is a specialised information security consultancy.
 Our mission is to help organisations identify and secure their information
 assets. Our expertise concentrates in security architecture design,
 managed security and professional services in security testing/review
 and compliance.

 Supporting this approach are professional and managed services in the
 following areas:

   * Compliance Services - Penetration testing, security reviews, 
     compliance and audit services
   * Wireless and mobility solutions - design, installation and management
     of IEEE 802.11a/b/g (WiFi), tele-mobility and other wireless solutions
   * UNIX-like systems, network and security advice and consulting

 Assurance.com.au also provides organisations with services to support
 compliance to legislative, public and internal/private standards. While
 primarily specialising in Australian & New Zealand standards efforts
 Assurance.com.au also works with other international standards related
 to information security

 These include:
  * ISO/IEC 17799:*, AS/NZS 17799:*, BS7799
  * ISO 15408 (Common Criteria), ITSEC, TCSEC
  * ISO 13569, ISO 11131
  * ACSI33, AS2805, AS3806, AS4360, AS4539, AS8018, HB231:2001, NPP4 (privacy)
  * Sarbanes-Oxley
Comment 2 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2005-11-07 20:26:38 UTC
fyi installed on my system with asterisk-1.0.9-r1:

/usr/share/doc/asterisk-1.0.9-r1/cgi/vmail.cgi
/usr/share/doc/asterisk-1.0.9-r1/scripts/vmail.cgi.gz

so both will need patching (uncompressed, they are identical; so maybe we should install just one).

patch available at:
http://cvsweb.digium.com/index.cgi/asterisk/contrib/scripts/vmail.cgi.diff?r1=1.15;r2=1.16


as this is a minor issue, i recommend against at GLSA.
Comment 3 Stefan Cornelius (RETIRED) gentoo-dev 2005-11-07 20:32:18 UTC
voip team or stkn, plz provide fixed ebuilds - thx
Comment 4 Stefan Knoblich (RETIRED) gentoo-dev 2005-11-08 07:35:44 UTC
fixed in cvs, all affected * versions have been rev-bumped 
Comment 5 solar (RETIRED) gentoo-dev 2005-11-08 08:02:09 UTC
Created attachment 72455 [details, diff]
vmail.cgi.patch (for older installs)

I have a little bit older of an install of asterisk/vmail here in production,
so
I had to add the untaint() function to the vmail.cgi to work around this.
Comment 6 Thierry Carrez (RETIRED) gentoo-dev 2005-11-08 08:16:14 UTC
Looks like all keywords are set, ready for a vote
Comment 7 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-11-08 22:24:12 UTC
I tend to vote NO. 
Comment 8 Tavis Ormandy (RETIRED) gentoo-dev 2005-11-14 01:39:09 UTC
vote NO, relatively minor.
Comment 9 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-11-14 01:50:03 UTC
Let's just make mine a full NO and close this one without GLSA.