Severity:

HIGH RISK

(7.3)

SQL Injection in Lost and Found Thing Management

CVE-2026-6164

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Data Exposure and Manipulation via SQL Injection

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Lost and Found Thing Management 1.0 contains a SQL injection flaw in the /addcat.php endpoint, where the cata parameter is incorporated into database queries without proper sanitization.

A remote attacker can manipulate this parameter to alter backend SQL queries, potentially exposing or modifying application data when the vulnerable code path is invoked.

Affected context

The vulnerability occurs in the web application's category management functionality, specifically in /addcat.php where the cata parameter is processed.

It is present when user-supplied input is concatenated directly into SQL statements without adequate validation, escaping, or use of parameterized queries.

Any deployment of Lost and Found Thing Management 1.0 that exposes this endpoint and connects to a database is potentially affected, especially when reachable over a network.

Exploit preconditions

  • Attack surface: HTTP(S) interface to the /addcat.php script
  • Required access: Ability to send crafted requests to the application (typically unauthenticated or low-privilege web access, depending on deployment)
  • Trigger point: Submission of malicious data in the cata parameter (e.g., via form fields or query parameters) that flows into an SQL statement
  • Why exploitation is possible: The application directly interpolates cata into SQL queries without using prepared statements or robust input neutralization, allowing injected fragments to change query structure or logic

Why this happens

The underlying issue is improper neutralization of special elements used in an SQL command, mapping to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

The code likely builds SQL statements using string concatenation or interpolation with the cata parameter, instead of employing prepared statements with bound parameters or a safe query builder.

This design treats incoming HTTP parameters as trusted and fails to enforce strict validation or encoding, enabling attacker-controlled input to modify the intended query semantics.

CWE-74 is also relevant because untrusted input is not appropriately sanitized before being used in a downstream interpreter (the SQL engine), reinforcing the pattern of unsafe data injection into a command context.

Potential impact

  • Extraction of sensitive information from the database, including user or item records
  • Modification or deletion of lost-and-found records, categories, or related metadata
  • Creation of unauthorized data, including fake entries that can distort application behavior
  • Bypassing of application-level authorization checks implemented in SQL
  • Potential pivot to other vulnerabilities if database credentials or configuration data are exposed

General mitigation guidance

Effective mitigation focuses on eliminating direct string-based query construction and strictly controlling how user input reaches the database.

Recommended defensive patterns include:

  • Using parameterized queries or prepared statements for all database interactions involving user-controlled data
  • Employing an ORM or query builder that enforces separation between query structure and data values
  • Applying strict server-side validation on the cata parameter (e.g., whitelisting expected formats, lengths, and character sets)
  • Centralizing database access logic so that secure query patterns are consistently applied across the application
  • Running the database with least-privilege credentials, limiting what the application account can read or modify

These measures reduce the risk that any single untrusted parameter can influence SQL control flow.

How teams detect issues like this

Organizations can detect this class of vulnerability through a combination of static and dynamic techniques:

  • Static analysis rules that flag concatenation of request parameters (like cata) into SQL strings, especially within PHP database APIs
  • Code reviews that focus on data flow from HTTP inputs to the database layer, checking for consistent use of prepared statements
  • Application security testing (DAST) that sends crafted SQL injection payloads to /addcat.php and monitors responses for anomalies or database error signatures
  • Logging and monitoring of database queries to identify unusual patterns, such as unexpected operators or always-true conditions
  • Integration of automated secure coding checks in CI pipelines to enforce policy around safe SQL construction

Sources

SourceLink
code-projects.orgcode-projects.org/
github.comgithub.com/lanPwa/CVE/issues/1
vuldb.comvuldb.com/submit/797089
vuldb.comvuldb.com/vuln/357052
vuldb.comvuldb.com/vuln/357052/cti

Frequently asked

questions

Yes. The attack can be initiated remotely by sending crafted HTTP requests to the vulnerable /addcat.php endpoint, as long as the application is network-accessible.

Typically, only web access to the affected endpoint is needed. Depending on the site's configuration, exploitation may be possible without authentication or from a low-privilege account.

Replace any string-concatenated SQL involving the cata parameter with parameterized queries or prepared statements, and enforce strict validation on the parameter before it reaches the database layer.

Adopt a development standard that mandates prepared statements for all database access, centralize data access patterns, perform regular security-focused code reviews, and use automated tools to flag direct insertion of user input into SQL queries.

Find out what's already
exploitable in your codebase.