/

CVE-2026-86161

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Online Voting System 1.0

CVE-2026-86161

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Database unauthorized access and modification

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

SourceCodester Online Voting System 1.0 contains a SQL injection vulnerability in the category-deletion endpoint. An attacker who can reach the endpoint may manipulate the category ID parameter to alter database queries, potentially exposing or modifying data; public exploit details increase the risk of opportunistic attacks.

Affected context

The issue occurs in the /ajax.php?action=delete_category functionality of SourceCodester Online Voting System 1.0. It becomes risky when the endpoint is remotely reachable and incorporates the supplied ID argument into a database query without sufficient parameterization or validation. The practical impact depends on database permissions, application exposure, and the protections surrounding the endpoint.

Exploit preconditions

  • Attack surface: HTTP request handling for the remote category-deletion endpoint
  • Required access: Network access to the application; authentication requirements depend on deployment and endpoint authorization
  • Trigger point: Processing the user-controlled ID argument
  • Why exploitation is possible: The argument may influence SQL query construction without adequate separation between data and query syntax

Why this happens

The underlying bug is improper neutralization of special elements in SQL statements, mapping to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection). The endpoint appears to treat a request parameter as part of a database command rather than as strictly typed data, allowing crafted input to change the intended query behavior. CWE-74 is also relevant because the broader issue involves insufficient neutralization of externally controlled syntax within an interpreted command.

Potential impact

  • An attacker may read unauthorized database records
  • Database contents could be modified or deleted
  • Application authentication or authorization data could be exposed
  • The application may experience data integrity loss or service disruption
  • Compromised database access could support further attacks against connected systems

General mitigation guidance

Mitigation generally centers on ensuring that request data cannot alter database command structure.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for every database operation
  • Applying strict server-side type and range validation to identifier values
  • Avoiding dynamic SQL construction from request parameters
  • Enforcing authorization checks before category-deletion operations
  • Restricting database accounts to the minimum permissions required by the application
  • Using secure-by-default database access libraries and centralized query abstractions
  • Reducing input trust by validating data at the request boundary and again near the data-access layer

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis rules that flag string concatenation or interpolation in SQL statements
  • Code review checks for database queries receiving direct request parameters
  • Dynamic testing of endpoint parameters using safe, non-destructive injection test cases
  • Web application firewall or API gateway policies that detect suspicious SQL syntax
  • Database monitoring for unexpected query shapes, privilege use, or access to unrelated tables
  • Automated security review tools that identify missing parameterization and weak input validation

Sources

SourceLink
github.comgithub.com/lwcc223/CVE/issues/3
vuldb.comvuldb.com/cve/CVE-2026-86161
vuldb.comvuldb.com/submit/895416
vuldb.comvuldb.com/vuln/399286
vuldb.comvuldb.com/vuln/399286/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

Yes. The affected endpoint is remotely reachable in deployments where the application is exposed, although authentication and authorization controls may affect practical exploitability.

The attacker needs network access to the application and whatever endpoint permissions the deployment requires. A publicly accessible endpoint with weak authorization presents greater risk.

Use parameterized queries or prepared statements, validate the identifier as the expected data type, and enforce authorization before performing the deletion.

Adopt centralized data-access patterns, prohibit dynamic SQL built from request values, apply least-privilege database permissions, and include static and dynamic security testing in the development lifecycle.

Find out what's already
exploitable in your codebase.