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

mysql_error.txt

mysql_error.txt
Posted Oct 2, 2006
Authored by DarkFig | Site acid-root.new.fr

The mysql_error() function in php versions less than or equal to 4.4.4 and 5.1.6 can be used to conduct cross site scripting attacks.

tags | advisory, php, xss
SHA-256 | f4830cd8ef61eade1008ac84377a1498c2eca77d9dbe3e0ac01f416cdcbe05fe

mysql_error.txt

Change Mirror Download
mysql_error() can lead to Cross Site Scripting attacks ========================================================
Affected.scr..: PHP4 <= 4.4.4 PHP5 <= 5.1.6
Advisory.ID...: 11060920
Risk.level....: Low
Vendor.Status.: Patched
Src.download..: http://www.php.net/
Adv.link......: acid-root.new.fr/advisories/11060920.txt
========================================================


==[ OVERVIEW
============
PHP: Hypertext Preprocessor is an open source server side
programming language extensively used for web scripts and to
process data passed via the Common Gateway Interface from
HTML forms etc. PHP can be written as scripts that reside on
the server and may produce HTML output that downloads to the
web browser. Alternatively, PHP can be embedded within HTML
pages that are then saved with a .php file extension. The PHP
sections of the page are then parsed by the PHP engine on the
server and the PHP code stripped out before the page is
downloaded to the web browser. The name is a bit of a
programming joke (if there is sucha thing) since it's a
recursive acronym i.e. the P in PHP stands for PHP.


==[ DETAILS
===========
The goal of the mysql_error() function is to return the error
text from the last MySQL function. This function can lead to
Cross Site Scripting attacks. To conduct this attack, some
parameters are required. If an mysql function use a bad parameter
provided by the attacker and if the mysql_error() result is
returned to the user, this can be exploited to conduct Cross
Site Scripting attack. This can be useful if the attacker has
a restricted access to an mysql function.


==[ POC/EXPLOIT
===============
<?php //?db=<script>alert(666)</script>
$link = mysql_connect("localhost", "root", "");
mysql_select_db($db, $link);
echo mysql_errno($link) . ": " . mysql_error($link). "\n";
?>


==[ LINKS
=========
Mysql functions list.: http://www.php.net/manual/en/ref.mysql.php
Discussion on php.net: http://bugs.php.net/bug.php?id=38733&edit=2


==[ SOLUTION
============
No response from PHP Team.


==[ TIMELINE
============
06. Sept. 2006 - Vendor contacted
20. Sept. 2006 - Public disclosure


==[ CONTACT
===========
Author: DarkFig
Web...: www.acid-root.new.fr
E-mail: gmdarkfig[*]gmail[*]com (fr/en)

Note: Tested on 4.4.3
Login or Register to add favorites

File Archive:

August 2024

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