/

CVE-2026-86290

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in SourceCodester ajax.php API

CVE-2026-86290

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Unauthorized database access and data manipulation

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-saving endpoint. A remote attacker may be able to manipulate the Category parameter to alter database queries, potentially accessing or changing application data when the endpoint is reachable and insufficiently protected.

Affected context

The weakness occurs in the Online Voting System's AJAX request handler at /voting/ajax.php?action=save_category. It may affect deployments where this endpoint is remotely accessible, the Category value reaches database queries without adequate parameterization, and authorization or input validation controls do not sufficiently constrain requests.

Exploit preconditions

  • Attack surface: The remotely reachable category-saving AJAX endpoint
  • Required access: Ability to send requests accepted by the endpoint; authentication requirements depend on the deployment
  • Trigger point: Processing of the Category argument during category creation or update
  • Why exploitation is possible: User-controlled input may be incorporated into a database query without reliable separation between data and SQL instructions

Why this happens

The underlying bug is an injection flaw in which externally controlled category data is interpreted as part of a database command. This maps primarily to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection). The related CWE-74 classification reflects the broader failure to separate untrusted input from an interpreter's command syntax.

Potential impact

  • An attacker may read information from application-accessible database tables
  • An attacker could modify, insert, or delete voting-system records
  • The application may experience integrity loss or service disruption
  • Exposed credentials or sensitive records could support further compromise

General mitigation guidance

Mitigation generally focuses on ensuring that database commands never interpret user-controlled values as SQL syntax.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for all database operations
  • Applying allowlist-based validation appropriate to category names and identifiers
  • Enforcing authorization checks independently of input validation
  • Limiting the database account to only the permissions required by the application
  • Avoiding detailed database errors in responses and maintaining secure logging
  • Reducing endpoint exposure when category management does not need to be public

How teams detect issues like this

Organizations can identify similar weaknesses through:

  • Static analysis rules that flag string concatenation or interpolation in SQL statements
  • Code review checks for database calls receiving request parameters directly
  • Dynamic testing of authenticated and unauthenticated endpoint paths using safe, non-destructive test cases
  • Monitoring for anomalous category-management requests, database errors, and unusual query activity
  • Policy enforcement requiring parameterized database access in application code

Automated code review and application security testing tools may help identify injection-prone data flows.

Sources

SourceLink
github.comgithub.com/W5M1n9/cve/issues/2
vuldb.comvuldb.com/cve/CVE-2026-86290
vuldb.comvuldb.com/submit/906187
vuldb.comvuldb.com/vuln/399452
vuldb.comvuldb.com/vuln/399452/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

Potentially. The affected endpoint is described as remotely reachable, but practical exploitability depends on deployment exposure, authentication, authorization, and database-query behavior.

Not necessarily. The required access depends on how the voting system protects the category-management endpoint and whether attackers can submit requests that reach it.

Use parameterized queries or prepared statements, validate inputs with context-appropriate allowlists, and enforce authorization before performing category-management operations.

Adopt secure database-access abstractions, prohibit query construction from concatenated request data, review data flows during code review, and test exposed endpoints for injection risks.

Find out what's already
exploitable in your codebase.