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

rt-sa-2008-002.txt

rt-sa-2008-002.txt
Posted Mar 13, 2008
Site redteam-pentesting.de

Mapbender version 2.4.4 suffers from a remote SQL injection vulnerability.

tags | exploit, remote, sql injection
advisories | CVE-2008-0301
SHA-256 | 7aa51dc144aa6835ece998206ba5219f9e18d886e1c5b89d12a5fd212930a6a1

rt-sa-2008-002.txt

Change Mirror Download
Advisory: SQL-Injections in Mapbender

During a penetration test RedTeam Pentesting discovered multiple
SQL-Injections in Mapbender. A remote attacker is able to execute
arbitrary SQL commands and therefore can get e.g. valid usernames and
password hashes of the Mapbender users.


Details
=======

Product: Mapbender
Affected Versions: 2.4.4 (verified), probably older versions, too
Fixed Versions: 2.4.5 rc1
Vulnerability Type: SQL-Injection
Security-Risk: high
Vendor-URL: http://www.mapbender.org
Vendor-Status: informed, fixed version released
Advisory-URL: http://www.redteam-pentesting.de/advisories/rt-sa-2008-002.php
Advisory-Status: public
CVE: CVE-2008-0301
CVE-URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-0301


Introduction
============

"Mapbender is the software and portal site for geodata management of OGC
OWS architectures. The software provides web technology for managing
spatial data services implemented in PHP, JavaScript and XML. It
provides a data model and interfaces for displaying, navigating and
querying OGC compliant map services. The Mapbender framework
furthermore provides authentication and authorization services, OWS
proxy functionality, management interfaces for user, group and service
administration in WebGIS projects."

(from the vendor's homepage)


More Details
============

Due to the lack of input validation, an attacker is able to inject
SQL-commands in many PHP scripts of Mapbender. This vulnerability can be
exploited regardless of PHP magic quotes. For demonstration purposes, the
injection into the "gaz" variable of the file
http/php/mod_gazetteer_edit.php is shown.

The two relevant lines are:

$sql = "SELECT * FROM gazetteer WHERE gazetteer_id = ".$_REQUEST["gaz"];
$res = db_query($sql);

The user input $_REQUEST["gaz"] goes unfiltered, unquoted and unescaped
into an SQL statement. As no prepared statements are used here, an
attacker can execute arbitrary SQL commands.

There is no need to use quotes in the SQL statement for an attacker, so
PHP magic quotes do not help.


Proof of Concept
================

The following request retrieves the first username and password hash
from the Mapbender database.

http://www.example.com/php/mod_gazetteer_edit.php?gaz= 1 LIMIT 0 UNION
(SELECT char(65), char(65), char(65), char(65), char(65), char(65),
mb_user_name, char(65), mb_user_password, char(65) from mb_user
LIMIT 0,1)


Workaround
==========

None.


Fix
===

The vulnerability is fixed in release 2.4.5 rc1.


Security Risk
=============

As an attacker is able to e.g. get the password hashes of the
administrators and other users, the risk is estimated as high.


History
=======

2007-12-14 Problem identified during a penetration test
2008-01-09 Customer approves contacting of Mapbender developers
2008-01-17 CVE number assigned
2008-03-10 Vendor releases fixed version
2008-03-11 Advisory released


RedTeam Pentesting GmbH
=======================

RedTeam Pentesting is offering individual penetration tests, short
pentests, performed by a team of specialised IT-security experts.
Hereby, security weaknesses in company networks or products are
uncovered and can be fixed immediately.

As there are only few experts in this field, RedTeam Pentesting wants to
share its knowledge and enhance the public knowledge with research in
security related areas. The results are made available as public
security advisories.

More information about RedTeam Pentesting can be found at
http://www.redteam-pentesting.de.
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    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