/

CVE-2026-86168

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in code-projects CMS login.php

CVE-2026-86168

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Database compromise and potential authentication bypass

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

A remotely reachable SQL injection vulnerability in the code-projects Content Management System 1.0 may allow attacker-controlled input in the user_name parameter to alter database queries. The issue becomes risky when login input is incorporated into SQL statements without safe parameter binding or equivalent query controls.

Affected context

The vulnerability occurs in the login.php authentication component of code-projects Content Management System 1.0 when the user_name value is processed as part of a database query. Deployments are particularly exposed when the login endpoint is remotely accessible and database input handling does not consistently separate data from SQL instructions.

Exploit preconditions

  • Attack surface: Remotely accessible login endpoint
  • Required access: No prior authenticated access may be necessary if the endpoint accepts unauthenticated login requests
  • Trigger point: Processing of the user_name argument in /login.php
  • Why exploitation is possible: User-controlled input may influence SQL query structure when parameterized queries or equivalent controls are absent

Why this happens

The underlying bug is an injection flaw in which externally supplied login data is incorporated into a database command without reliably treating it as data only. This maps primarily to CWE-89, SQL Injection, and is also related to CWE-74, which covers improper control of externally influenced command syntax. The insecure pattern is constructing SQL through string concatenation, interpolation, or insufficiently constrained query fragments.

Potential impact

  • An attacker may bypass authentication checks
  • Sensitive database records could be disclosed
  • Database contents could be modified or deleted
  • Application integrity and availability could be affected
  • Database credentials or connected services could be exposed

General mitigation guidance

Mitigation generally centers on ensuring that all login inputs remain data

rather than executable query syntax.

Common defensive patterns include:

  • Use parameterized queries or prepared statements for every database operation
  • Apply centralized database access helpers that do not construct SQL from raw input
  • Enforce allowlisted validation where input formats are known
  • Use database accounts with only the permissions required by the application
  • Avoid exposing detailed database errors to remote users
  • Treat authentication and authorization checks as separate, independently validated controls
  • Add regression tests for injection resistance across all authentication inputs

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying SQL string concatenation or interpolation involving request parameters
  • Code review checks for direct use of user_name or similar request values in query construction
  • Dynamic application testing of authentication inputs using approved security test procedures
  • Database and application monitoring for abnormal query errors, authentication anomalies, or unexpected data access
  • Policy enforcement requiring prepared statements through shared data-access libraries
  • Automated code review tools that flag unparameterized database APIs

Sources

SourceLink
code-projects.orgcode-projects.org/
github.comgithub.com/ahmadmarz10-hub/CVEsMarz/blob/main/SQL%20Injection%20Vulnerability%20in%20Content%20Management%20System%20%60user_name%60%20Parameter.md
vuldb.comvuldb.com/cve/CVE-2026-86168
vuldb.comvuldb.com/submit/895608
vuldb.comvuldb.com/vuln/399307
vuldb.comvuldb.com/vuln/399307/cti

Frequently asked

questions

Yes. The affected login endpoint is described as remotely reachable, so an attacker may be able to submit crafted input without local system access.

Not necessarily. Because the issue is located in a login function, the relevant request may be available before successful authentication, depending on deployment and access controls.

Use parameterized queries or prepared statements for all database operations, combined with appropriate input validation and least-privilege database permissions.

Standardize secure database-access APIs, prohibit raw query construction from request data, review authentication code carefully, and include static and dynamic injection checks in development pipelines.

Find out what's already
exploitable in your codebase.