CVE-2014-125081 (PHP, published 2023-01-17T23:15Z)
Description: value: A vulnerability, which was classified as critical, has been found in risheesh debutsav. This issue affects some unknown processing. The manipulation leads to sql injection. The patch is named 7a8430df79277c613449262201cc792db894fc76. It is recommended to apply a patch to fix this issue. The associated identifier of this vulnerability is VDB-218459.
Severity: nan (CVSS v3 base score: 9.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/risheesh/debutsav
Files changed:
assets/php/delegateRegistration.php
assets/php/speakerRegistration.php
Commit message: Fixed sqli in sqlite3


Vulnerable code:
		$name = $_POST['del-name'];
			$email = $_POST['del-email'];
		$org = $_POST['del-org'];
		$city = $_POST['del-city'];
			$arrival = $_POST['del-arrival'];
			$departure = $_POST['del-depart'];
			$accom = $_POST['del-accom'];
			$tshirt = $_POST['del-tshirt'];
error_reporting( E_ALL );
ini_set( 'display_errors', '1' );
		$name = $_POST['sp-name'];
			$email = $_POST['sp-email'];
		$org = $_POST['sp-org'];
		$city = $_POST['sp-city'];
			$profile = $_POST['sp-profile'];
			$tshirt = $_POST['sp-tshirt'];
			$arrival = $_POST['sp-arrival'];
			$departure = $_POST['sp-depart'];
			$accom = $_POST['sp-accom'];
		$pretitle = $_POST['sp-title'];
			$title = $_POST['sp-title'];
			$desc = $_POST['sp-desc'];
//				header( 'location:../../registration_fail.html' );
//			header( 'location:../../registration_fail.html' );

Fixed code:
		$name = SQLite3::escapeString($_POST['del-name']);
			$email = SQLite3::escapeString($_POST['del-email']);
		$org = SQLite3::escapeString($_POST['del-org']);
		$city = SQLite3::escapeString($_POST['del-city']);
			$arrival = SQLite3::escapeString($_POST['del-arrival']);
			$departure = SQLite3::escapeString($_POST['del-depart']);
			$accom = SQLite3::escapeString($_POST['del-accom']);
			$tshirt = SQLite3::escapeString($_POST['del-tshirt']);
error_reporting(0);
		$name = SQLite3::escapeString( $_POST['sp-name'] );
			$email = SQLite3::escapeString( $_POST['sp-email'] );
		$org = SQLite3::escapeString( $_POST['sp-org'] );
		$city = SQLite3::escapeString( $_POST['sp-city'] );
			$profile = SQLite3::escapeString( $_POST['sp-profile'] );
			$tshirt = SQLite3::escapeString( $_POST['sp-tshirt'] );
			$arrival = SQLite3::escapeString( $_POST['sp-arrival'] );
			$departure = SQLite3::escapeString( $_POST['sp-depart'] );
			$accom = SQLite3::escapeString( $_POST['sp-accom'] );
		$pretitle = SQLite3::escapeString( $_POST['sp-title'] );
			$title = SQLite3::escapeString( $_POST['sp-title'] );
			$desc = SQLite3::escapeString( $_POST['sp-desc'] );
				header( 'location:../../registration_fail.html' );
			header( 'location:../../registration_fail.html' );