Package: nanourl
Version: 0.1-7.1
Severity: important

*** Please type your report below this line ***

The lookup of destination URLs uses unescaped parameters from
the query string, making a classic SQL Injection security hole.

In real terms this package is not security critical, has a low
user-base, and so I'm only treating it as "important" and not
critical.

Code in question is:

--
   ...
   $hash= $_GET['num'];
   ...

   $result = mysql_query("SELECT url FROM urls WHERE hash = '$hash'");
   if(! ($result)) {
            die(mysql_error());
   }

--


Consider the case where "hash" is set to:

  bogus' or urls LIKE '%private%

Leading to a query like:


   SELECT url FROM urls WHERE hash = 'bogus' or urls LIKE '%private%'


CVE ID is probably required :)


-- System Information:
Debian Release: 6.0.2
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/3 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



Steve
--
Let me steal your soul?
http://stolen-souls.com



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to