CVE-2015-10038 (PHP, published 2023-01-11T19:15Z)
Description: value: A vulnerability was found in nym3r0s pplv2. It has been declared as critical. Affected by this vulnerability is an unknown functionality. The manipulation leads to sql injection. The patch is named 28f8b0550104044da09f04659797487c59f85b00. It is recommended to apply a patch to fix this issue. The associated identifier of this vulnerability is VDB-218023.
Severity: nan (CVSS v3 base score: 8)
Weakness: CWE-89 \u2014 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
Repository: https://github.com/nym3r0s/pplv2
Files changed:
matchday/confirm11.php
matchday/index.php
matchday/matchday.php
matchday/playerInfo.php
matchday/squadGen.php
transfers/balance.php
transfers/confirm16.php
transfers/index.php
transfers/playerInfo.php
transfers/playersGen.php
transfers/remainingTransfers.php
transfers/transfers.php
transfers/userGen.php
Commit message: Added fix for SQL Injection


Vulnerable code:
$user = $_SESSION['user'];
$idString = $_POST['c11'];
$user = $_SESSION['user'];
$playerId = $_POST['req'];
$user = $_SESSION['user'];
		echo('<div class="row_right"> <div>'.$playerCountry.'</div> <div>'.$playerType.'</div> <div>'.$playerMatches.'</div> <div>'.$playerForm.'</div><div>'.$playerConfidence.'</div></div>');
$user = $_SESSION['user'];
$user = $_SESSION['user'];
$user = $_SESSION['user'];
$idString = $_POST['c16'];
$playerId = $_POST['req'];
$user = $_SESSION['user'];
		echo('<div class="row_right"> <div>'.$playerCountry.'</div> <div>'.$playerType.'</div> <div>'.$playerMatches.'</div> <div>'.$playerForm.'</div><div>'.$playerConfidence.'</div></div>');
$user = $_SESSION['user'];
$user = $_SESSION['user'];
$user = $_SESSION['user'];
	<div class="transferDetails">
		<div id="playerBalance"></div>
		<div id="transferBalance"></div>
	</div>
		
$user = $_SESSION['user'];

Fixed code:
$user = mysql_real_escape_string($_SESSION['user'])s;
$idString = mysql_real_escape_string($_POST['c11']);
<?php
    header('Location: ./matchday.php');
?>
$user = mysql_real_escape_string($_SESSION['user']);
$playerId = mysql_real_escape_string($_POST['req']);
$user = mysql_real_escape_string($_SESSION['user']);
        echo('<div class="row_right"> <div>'.$playerCountry.'</div> <div>'.$playerType.'</div> <div>'.$playerMatches.'</div> <div>'.$playerForm.'</div><div>'.$playerConfidence.'</div></div>');
$user = mysql_real_escape_string($_SESSION['user']);
$user = mysql_real_escape_string($_SESSION['user']);
$user = mysql_real_escape_string($_SESSION['user']);
$idString = mysql_real_escape_string($_POST['c16']);
<?php
    header('Location: ./transfers.php');
?>
$playerId = mysql_real_escape_string($_POST['req']);
$user = mysql_real_escape_string($_SESSION['user']);
        echo('<div class="row_right"> <div>'.$playerCountry.'</div> <div>'.$playerType.'</div> <div>'.$playerMatches.'</div> <div>'.$playerForm.'</div><div>'.$playerConfidence.'</div></div>');
$user = mysql_real_escape_string($_SESSION['user']);
$user = mysql_real_escape_string($_SESSION['user']);
$user = mysql_real_escape_string($_SESSION['user']);
    <div class="transferDetails">
        <div id="playerBalance"></div>
        <div id="transferBalance"></div>
    </div>

$user = mysql_real_escape_string($_SESSION['user']);