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:

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
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 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