Safeguard
Vulnerability Analysis•

CVE-2024-1821: Medium SQL Injection in Crime Reporting System

CVE-2024-1821 is a medium (5.5) SQL injection in Crime Reporting System version 1.0. Lower scored sibling of CVE-2024-1820.

Safeguard Security Team
4 min read

CVE-2024-1821 is a medium severity (CVSS 5.5) SQL injection flaw in Crime Reporting System version 1.0 from code-projects. It affects the page that adds police records. The record names no fixed version, so check the project page, patch the code yourself, or retire the application.

What's affected

Crime Reporting System version 1.0, from code-projects. The record lists version 1.0 only, and does not name any newer or patched release.

The description puts the flaw in the file police_add.php, where the police_name, police_id, police_spec and password arguments lead to SQL injection. The weakness is CWE-89, SQL injection. The description says the attack can be launched remotely and that the exploit has been disclosed publicly and may be used.

Severity conflict. The description text, which follows the VulDB style, calls this issue critical. NVD's own CVSS 3.1 score is 5.5, which is Medium, with the vector CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L. Both ratings are published. The vector uses an adjacent network path with low privileges, so the attacker needs a logged in account and access to the same network segment, which is why this scores lower than the sibling login bug.

How to check if you're exposed

These are small PHP applications with no package manager entry, so the check is about your own deployment. Find the install and confirm the product and version:

find / -type f -name "police_add.php" 2>/dev/null
grep -rn "mysqli_query\|mysql_query" /var/www/html | head -50

The second command lists places where queries are run directly. Look at each one that uses a request value such as a POST or GET field. A query assembled by joining strings with request data is the weakness class this CVE describes.

Check your web server access logs for repeated requests to police_add.php from addresses you do not recognise, and for login attempts that succeed with odd looking input. That tells you whether anyone has already probed the endpoint.

What to do now

  1. Decide whether you actually run this application. If it is a demo, a learning project or an unused install, take it offline and delete it.
  2. Check the record references and the project page for a fixed release. None is named in the record, so assume there is no patch.
  3. If you must keep it, change the vulnerable query to use prepared statements with bound parameters, and validate input on the server.
  4. Put the application behind authentication or a VPN, and do not expose it directly to the internet.
  5. Run it with a database account that has only the rights it needs, and rotate any credentials stored in its tables.

Why it matters

SQL injection is one of the oldest and best understood web flaws. The fix is also well understood: use prepared statements with bound parameters, so the database never confuses a value with part of the query. When code builds the query by joining strings, a crafted value can change what the query does.

This page adds police records, so it is a feature behind a login. The record scores it lower because the attacker needs some access first, but an injectable insert can still read or change data it should not. Public exploit write-ups make small applications like this easy targets, because attackers scan for known file names.

The record's Known Exploited Vulnerabilities flag is false, and I found no source saying this CVE is exploited in the wild. The description does say the exploit has been disclosed publicly.

Quick check

Why is the score lower than CVE-2024-1820?

The vector in this record uses an adjacent network attack path with low privileges, while the login bug needs neither.

Which fields are affected?

police_name, police_id, police_spec and password, per the description.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.