what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Postfixadmin 2.3.4 SQL Injection / Cross Site Scripting

Postfixadmin 2.3.4 SQL Injection / Cross Site Scripting
Posted Jan 30, 2012
Authored by Filippo Cavallarin

Postfixadmin version 2.3. 4 suffers from cross site scripting and remote SQL injection vulnerabilities.

tags | exploit, remote, vulnerability, xss, sql injection
SHA-256 | 792946daa68d21da19823d935d226aff83199c4a69cc33fe6dfa3dcbd4a11618

Postfixadmin 2.3.4 SQL Injection / Cross Site Scripting

Change Mirror Download
Advisory ID:  CSA-12002
Title: Multiple vulnerabilities in postfixadmin
Product: postfixadmin
Version: 2.3.4 and probably prior
Vendor: www.postifixadmin.org
Vulnerability type: SQL injection, XSS
Vendor notification: 2012-01-10
Public disclosure: 2012-01-26


postfixadmin version 2.3.4 and probably below suffers from multiple vulnerabilities:


1) SQL injection in pacrypt function: if postfixadmin is configured with 'mysql_encrypt' the pacrypt function passes the $pw parameter to sql query without santitzing it allowing non-admin users to perform sql injection attacks.



2) SQL injection in sql dump generated by backup.php: the backup.php file generates sql queries without sanitizing values. A non-admin user can inject arbitrary sql commands into backup file that will be executed when an admin restores that backup. To test this issue try to set the vacation message of any user to:

dontcare','','dominio.com','2012-01-09 17:34:06','1');
INSERT INTO admin (username,password,created,modified,active)
VALUES ('some@email.com','$1$2cab7a19$zIuOsr6PXksCu13883fVg/','2012-01-08 15:48:1','2012-01-09 17:17:0','1'); #

then take a backup and restore it, the new admin some@email.com is added to admin table.



3) XSS in edit-vacation.php: Input passed via domain GET parameter to edit-vacation.php is not properly sanitised before being returned to the user.

http://127.0.0.1/postfixadmin-2.3.4/edit-vacation.php?domain=dontcare</script><script>alert(1);</script>



4) XSS in edit-vacation.php: Input passed via fDomain POST parameter to create-domain.php is not properly sanitised before being returned to the user.
This is interesting because the fDomain variable is passed to strip_tags so something like on<a>click is trasformed to onclik. This allows to bypass browsers builtin XSS protection.
To test this issue put the following string as Domain parameter in create-domain.php, submit the form and then click on Domain's input text..

dontcare" oncli<a>ck=alert(document.cookie);//



5) Others XSS on POST vars: to exploit them you need to perform a CSRF attack that can leat to arbitrary data inserted into db insted of just a script executed in the browser.

create-alias.php and edit-alias.php
fGoto:<script>alert(1)</script>some@email.com

edit-domain.php
Description: <script>alert(1)</script>

create-mailbox.php and edit-mailbox.php
Name: <script>alert(1)</script>

fetchmail.php
Server: <script>alert(1)</script>

these xss (except the first one) are saved into db (ie fetchmail.php saves <script>alert(1)</script> as server name). This means that even if a remote attacker must perform a CSRF to exploit these XSS,a malicious admin can insert scripts into db that get executed when other admins load a list (ie list-virtual.php)



Solution

upgrade to postfixadmin 2.3.5



Filippo Cavallarin


C o d S e q
Development with an eye on security
------------------------------------------------------------------------
Castello 2005, 30122 Venezia
Tel: 041 88 761 58 - Fax: 041 81 064 714 - Cell: 346 66 93 254
c.f. CVLFPP82B27L736J - p.iva 03737650279
http://www.codseq.it - filippo.cavallarin@codseq.it
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    0 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close