Lucene search
K

phpTrafficA 2.3 SQL Injection Vulnerability

🗓️ 10 Dec 2014 00:00:00Reported by Daniel GeertsType 
zdt
 zdt
🔗 0day.today👁 31 Views

phpTrafficA 2.3 SQL Injection Vulnerability in log_function.ph

Related
Code
ReporterTitlePublishedViews
Family
CVE
CVE-2014-8340
16 Dec 201418:00
cve
Cvelist
CVE-2014-8340
16 Dec 201418:00
cvelist
EUVD
EUVD-2014-8178
7 Oct 202500:30
euvd
NVD
CVE-2014-8340
16 Dec 201418:59
nvd
Packet Storm
phpTrafficA 2.3 SQL Injection
9 Dec 201400:00
packetstorm
Prion
Sql injection
16 Dec 201418:59
prion
securityvulns
[CVE-2014-8340] phpTrafficA SQL injection
22 Dec 201400:00
securityvulns
securityvulns
Web applications security vulnerabilities summary (PHP, ASP, JSP, CGI, Perl)
22 Dec 201400:00
securityvulns
Product: phpTrafficA
Product page: http://soft.zoneo.net/phpTrafficA/
Affected versions: Up to and including 2.3 (latest as of writing).

Description:
An SQL injection exists in Php/Functions/log_function.php, line 933:
$sql3 ="INSERT INTO `${table}_host` SET date='$date', host='',
hostname='', page='$page', ref='$cleanref', agent='$agent',
longIP='$iplong'";

The $agent variable comes directly from $_SERVER['HTTP_USER_AGENT'],
without any escaping. This makes SQL injection possible. Even if
multiple statements in one query has been turned off, the contents of
the database can still be read by manipulating the last parameter of the
query (the IPv4-address stored as an integer). For example, the
following spoofed user agent will store the ASCII-value of the second
character of the admin hash as its IP:
Firefox', longIP=(SELECT ASCII(SUBSTRING(value,2,1)) FROM
phpTrafficA_conf WHERE variable='adminpassword') #
This will be displayed in the "Latest visitors > Details" section, and
by repeating this procedure multiple times, the entire admin hash (or
any other database content) can be retrieved.

Partial mitigations:
- - Turn off "multiple statements in one query".
- - Hide "Latest visitors > Details" section from view. This prevents
the attacker from obtaining the output of the manipulated query.
- - Apply this quick fix to line 933:
$sql3 ="INSERT INTO `${table}_host` SET date='$date', host='',
hostname='', page='$page', ref='$cleanref',
agent='".mysql_real_escape_string($agent)."', longIP='$iplong'";

The code-fix does not resolve the SQL injection for all server
configurations, but should be sufficient for most. A proper fix would be
a version of phpTrafficA that uses PDO with prepared statements.

#  0day.today [2018-03-02]  #

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

10 Dec 2014 00:00Current
7.6High risk
Vulners AI Score7.6
EPSS0.00319
31