Security: SQL Injection in picture.php via param idh_adh affect by versions 0.63, 0.63.1, 0.63.2, 0.63.3, 0.64rc1
I've discovered a SQL injection in Galette software on 0.63 branch version and it's seems not fixed regarding the ChangeLog here . The advisory below:
It seems only versions listed here are vulnerable :
The vulnerability is located in file includes/picture.class.php at L.71-73 (cf. )
... $sql = "SELECT picture,format FROM ".PREFIX_DB."pictures WHERE id_adh=".$id_adh; ...
$id_adh is an input controlled by the user in file picture.php and not filtered at line L.35-36 (cf. ) :
... else $id_adh = $_GET['id_adh']; ...
The queries below allow to inject SQL injection to create a data leak in order to retrieve datas on database and server configuration on a Galette fresh installation
- Leak MySQL Version
- Leak tables name on a MySQL 5.x (group_concat is limiting output here)
I don't want to show too many exploitable queries to avoid the usage by kiddies but it's possible to inject hard queries in order to leak adherents datas.
Impact of the vulnerablity¶
Galette is a well known adherent web interface used by lots of associations (specially French one), it's possible to look for vulnerable targets using the Google dorks below:
- inurl:self_adherent.php intitle:"Galette v0.63"
- inurl:self_adherent.php intitle:Galette
The impact is to create database data leaks exposure on any vulnerable Galette installation.
Mitigation of the vulnerability¶
Update to 0.7.x version
Sofian Brabez <email@example.com>
- 09/05/2012: Contact vendor through bug tracker on redmine.ulysses.fr