CVE-2013-10014 (published 2023-01-19T10:15Z)

A vulnerability classified as critical has been found in oktora24 2moons. Affected is an unknown function. The manipulation leads to sql injection. The patch is identified as 1b09cf7672eb85b5b0c8a4de321f7a4ad87b09a7. It is recommended to apply a patch to fix this issue. VDB-218898 is the identifier assigned to this vulnerability.

CVSS v3 base score: 9.8, CRITICAL (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)

Weakness information:
cwe_id: CWE-89
cwe_name: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
description: 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.
extended_description: 
            
            
         
         

Fix information:
repo_url: https://github.com/oktora24/2moons
commit_details: repo_url: https://github.com/oktora24/2moons
author: slaver7
author_date: 2013-01-18 11:31:33+00:00
msg: fix possible sql injections.
repository: repo_url: https://github.com/oktora24/2moons
repo_name: oktora24/2moons
description: Automatically exported from code.google.com/p/2moons
repo_language: PHP
owner: oktora24
file_changes: filename: class.ShowFleetStep1Page.php
change_type: ModificationType.MODIFY
diff: @@ -41,10 +41,10 @@ class ShowFleetStep1Page extends AbstractPage
 	{
 		global $USER, $PLANET, $resource, $pricelist, $reslist, $LNG;
 		
-		$targetGalaxy 			= HTTP::_GP('galaxy', $PLANET['galaxy']);
-		$targetSystem 			= HTTP::_GP('system', $PLANET['system']);
-		$targetPlanet			= HTTP::_GP('planet', $PLANET['planet']);
-		$targetType 			= HTTP::_GP('type', $PLANET['planet_type']);
+		$targetGalaxy 			= HTTP::_GP('galaxy', (int) $PLANET['galaxy']);
+		$targetSystem 			= HTTP::_GP('system', (int) $PLANET['system']);
+		$targetPlanet			= HTTP::_GP('planet', (int) $PLANET['planet']);
+		$targetType 			= HTTP::_GP('type', (int) $PLANET['planet_type']);
 		
 		$mission				= HTTP::_GP('target_mission', 0);
 				

programming_language: PHP
filename: class.ShowFleetTablePage.php
change_type: ModificationType.MODIFY
diff: @@ -192,10 +192,10 @@ class ShowFleetTablePage extends AbstractPage
 
 		$maxFleetSlots	= FleetFunctions::GetMaxFleetSlots($USER);
 
-		$targetGalaxy	= HTTP::_GP('galaxy', $PLANET['galaxy']);
-		$targetSystem	= HTTP::_GP('system', $PLANET['system']);
-		$targetPlanet	= HTTP::_GP('planet', $PLANET['planet']);
-		$targetType		= HTTP::_GP('planettype', $PLANET['planet_type']);
+		$targetGalaxy	= HTTP::_GP('galaxy', (int) $PLANET['galaxy']);
+		$targetSystem	= HTTP::_GP('system', (int) $PLANET['system']);
+		$targetPlanet	= HTTP::_GP('planet', (int) $PLANET['planet']);
+		$targetType		= HTTP::_GP('planettype', (int) $PLANET['planet_type']);
 		$targetMission	= HTTP::_GP('target_mission', 0);
 		
 		$fleetResult 		= $GLOBALS['DATABASE']->query("SELECT * FROM ".FLEETS." WHERE fleet_owner = ".$USER['id']." AND fleet_mission <> 10 ORDER BY fleet_end_time ASC;");

programming_language: PHP
filename: class.ShowGalaxyPage.php
change_type: ModificationType.MODIFY
diff: @@ -47,12 +47,12 @@ class ShowGalaxyPage extends AbstractPage
 		$galaxyRight	= HTTP::_GP('galaxyRight', '');
 		$systemLeft		= HTTP::_GP('systemLeft', '');
 		$systemRight	= HTTP::_GP('systemRight', '');
-		$galaxy			= min(max(HTTP::_GP('galaxy', $PLANET['galaxy']), 1), Config::get('max_galaxy'));
-		$system			= min(max(HTTP::_GP('system', $PLANET['system']), 1), Config::get('max_system'));
-		$planet			= min(max(HTTP::_GP('planet', $PLANET['planet']), 1), Config::get('max_planets'));
+		$galaxy			= min(max(HTTP::_GP('galaxy', (int) $PLANET['galaxy']), 1), Config::get('max_galaxy'));
+		$system			= min(max(HTTP::_GP('system', (int) $PLANET['system']), 1), Config::get('max_system'));
+		$planet			= min(max(HTTP::_GP('planet', (int) $PLANET['planet']), 1), Config::get('max_planets'));
 		$type			= HTTP::_GP('type', 1);
 		$current		= HTTP::_GP('current', 0);
-			
+		
         if (!empty($galaxyLeft))
             $galaxy	= max($galaxy - 1, 1);
         elseif (!empty($galaxyRight))

programming_language: PHP
filename: class.ShowInformationPage.php
change_type: ModificationType.MODIFY
diff: @@ -55,7 +55,7 @@ class ShowInformationPage extends AbstractPage
 			$this->sendJSON(array('message' => $LNG['in_jump_gate_already_used'].' '.pretty_time($NextJumpTime - TIMESTAMP), 'error' => true));
 		}
 		
-		$TargetPlanet = HTTP::_GP('jmpto', $PLANET['id']);
+		$TargetPlanet = HTTP::_GP('jmpto', (int) $PLANET['id']);
 		$TargetGate   = $GLOBALS['DATABASE']->getFirstRow("SELECT id, last_jump_time FROM ".PLANETS." WHERE id = ".$TargetPlanet." AND id_owner = ".$USER['id']." AND sprungtor > 0;");
 
 		if (!isset($TargetGate) || $TargetPlanet == $PLANET['id']) {

programming_language: PHP