
Detaillierte Analyse von CVE-2025-7461, einer SQL-Injection-Schwachstelle im Modern Bag E-Commerce System V1.0, mit Ursachenanalyse, Exploit-Code und Anleitung zur Behebung.
🌐 Sprache / 语言: Deutsch | 简体中文
Schwachstellendatenbank: https://vuldb.com/?id.316112
Projektquelle: https://code-projects.org/modern-bag-in-php-css-javascript-and-mysql-free-download/
| Element | Details |
|---|---|
| Produktname | Modern Bag E-Commerce-System |
| Version | V1.0 |
| Schwachstellentyp | SQL Injection (Boolean-based blind, Error-based, Time-based blind) |
| Betroffene Datei | /action.php |
| Schweregrad | Mittel |
| CVSS 3.1 Score | 6.9 |
Primäre Schwachstelle: Zeilen 272-289 in action.php
// Vulnerable code
if (isset($_POST["addToProduct"])) {
if (isset($_SESSION["uid"])) {
$p_id = $_POST["proId"]; // Direct user input retrieval
$user_id = $_SESSION["uid"];
// Direct concatenation into SQL query without any filtering
$sql = "SELECT * FROM cart WHERE p_id = '$p_id' AND user_id = '$user_id'";
$run_query = mysqli_query($con, $sql);
$count = mysqli_num_rows($run_query);
// ... subsequent code
}
}
$p_id = $_POST["proId"];
Die Anwendung akzeptiert Benutzereingaben vom Parameter proId direkt ohne Validierung oder Bereinigung.
$sql = "SELECT * FROM cart WHERE p_id = '$p_id' AND user_id = '$user_id'";
Die SQL-Abfrage wird durch direkte String-Konkatenation erstellt, was sie anfällig für Injection-Angriffe macht.
$run_query = mysqli_query($con, $sql)
or die(mysqli_error($con)); // ❌ Direct exposure of database errors
Datenbankfehler werden direkt an Angreifer weitergegeben und liefern wertvolle Informationen für die Ausnutzung.
Bericht erstellt: 2025 Vulnerability ID: CVE-2025-7461 Schweregrad: Mittel (CVSS 3.1: 6.9) Status: Offengelegt