lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20060921103348.GA23188@brucia.ulcc.ac.uk>
Date: Thu, 21 Sep 2006 11:33:48 +0100
From: Ben Wheeler <b.wheeler@...c.ac.uk>
To: gmdarkfig@...il.com
Cc: bugtraq@...urityfocus.com
Subject: Re: mysql_error() can lead to Cross Site Scripting attacks

On Wed, Sep 20, 2006 at 12:47:54PM -0000, gmdarkfig@...il.com wrote:
>  Vendor.Status.: Patched

Has this really been patched? It doesn't appear to
be a bug and the discussion has it marked as Bogus.

The "POC" contains two fundamental security flaws:

1. Using untrusted input to mysql_select_db() without sanitising it
> mysql_select_db($db, $link);

2. Printing the result of a function directly to the browser without
ensuring that it is appropriately escaped.
> echo mysql_errno($link) . ": " . mysql_error($link). "\n";

It's up to the programmer to sanitise input and output as appropriate. 
You cannot blindly assume that input is safe to pass to functions, nor 
that a string returned from a function{*} is safe to output (or put into 
an SQL query, or use in any other way), without checking it.
{*} with obvious exceptions for functions whose job it is to make strings
safe for a particular use, such as htmlspecialchars(), addslashes() etc.

Ben

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ