Skip to main content
CVE Vulnerability Database

CVE-2024-7197: Complaints Management System SQLi Flaw

CVE-2024-7197 is a critical SQL injection vulnerability in Oretnom23 Complaints Report Management System 1.0 affecting the manage_complaint.php file. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2024-7197 Overview

CVE-2024-7197 is a SQL injection vulnerability [CWE-89] in SourceCodester Complaints Report Management System 1.0, developed by oretnom23. The flaw resides in the /admin/manage_complaint.php script, where the id parameter is passed to a backend database query without proper sanitization. Authenticated attackers can manipulate the parameter to inject arbitrary SQL statements. The vulnerability is remotely exploitable over the network and the exploit details have been publicly disclosed through VulDB (identifier VDB-272618) and a GitHub Gist. This affects the confidentiality, integrity, and availability of application data stored in the underlying database.

Critical Impact

Remote attackers with low-privileged access can execute arbitrary SQL queries through the id parameter, enabling data theft, tampering, and potential administrative account compromise.

Affected Products

  • SourceCodester Complaints Report Management System 1.0
  • Vendor: oretnom23
  • Component: /admin/manage_complaint.php

Discovery Timeline

  • 2024-07-29 - CVE-2024-7197 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-7197

Vulnerability Analysis

The vulnerability exists in the administrative interface of the Complaints Report Management System. The file /admin/manage_complaint.php accepts a user-supplied id argument and incorporates it directly into a SQL query without parameterization or input validation. This allows an attacker to break out of the intended query context and append arbitrary SQL clauses. Because the affected endpoint is under /admin/, exploitation requires low-privileged authenticated access as indicated by the CVSS vector (PR:L). Once exploited, the attacker can read, modify, or delete records in the complaints database, extract credentials, or pivot to further compromise the application.

Root Cause

The root cause is improper neutralization of special elements used in a SQL command [CWE-89]. The application concatenates the id HTTP request parameter into a SQL statement rather than binding it as a parameter through a prepared statement. No server-side type checking, allow-listing, or escaping is applied before the value reaches the database driver.

Attack Vector

An authenticated attacker sends a crafted HTTP request to /admin/manage_complaint.php with a malicious payload in the id parameter. Typical payloads leverage UNION-based or boolean-based injection to enumerate database schemas and exfiltrate data. Refer to the published GitHub Gist PoC and VulDB entry #272618 for the disclosed technical details. No verified exploit code is reproduced here.

Detection Methods for CVE-2024-7197

Indicators of Compromise

  • Web server access logs containing requests to /admin/manage_complaint.php with SQL metacharacters such as ', --, UNION, SELECT, or SLEEP in the id parameter.
  • Unexpected database errors or long-running queries originating from the complaints management application.
  • Unusual outbound data volumes from the web application host following administrative session activity.

Detection Strategies

  • Deploy a Web Application Firewall (WAF) rule set targeting SQL injection patterns against the /admin/manage_complaint.php endpoint.
  • Enable database query logging and alert on abnormal query structures referencing information_schema or stacked queries.
  • Correlate administrative authentication events with subsequent anomalous query patterns to identify authenticated abuse.

Monitoring Recommendations

  • Monitor HTTP request parameters for encoded SQL payloads targeting the id argument.
  • Track failed and successful admin logins followed by high-volume requests to the complaint management endpoint.
  • Alert on any modification to administrative user records or privilege changes within the application database.

How to Mitigate CVE-2024-7197

Immediate Actions Required

  • Restrict access to the /admin/ directory using network-level controls or IP allow-listing until a patch is applied.
  • Rotate credentials for all administrative accounts and any database service accounts used by the application.
  • Review web server and database logs for indicators of prior exploitation attempts.

Patch Information

No official vendor patch has been published for this vulnerability at the time of writing. SourceCodester projects released by oretnom23 are frequently used as learning artifacts and may not receive coordinated security updates. Organizations running this software in production should evaluate replacement or apply the workarounds below.

Workarounds

  • Modify /admin/manage_complaint.php to use prepared statements with bound parameters (for example, mysqli_prepare or PDO with bindParam) for the id argument.
  • Enforce strict server-side validation that the id parameter is an integer before it reaches any query.
  • Deploy a WAF rule blocking SQL metacharacters in requests to the affected endpoint.
  • Consider taking the application offline if it is not business-critical, given the public availability of exploit details.
bash
# Example ModSecurity rule to block SQLi patterns on the vulnerable endpoint
SecRule REQUEST_URI "@beginsWith /admin/manage_complaint.php" \
  "chain,id:1007197,phase:2,deny,status:403,log,msg:'CVE-2024-7197 SQLi attempt'"
  SecRule ARGS:id "!@rx ^[0-9]+$" "t:none"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.