Severity:

HIGH RISK

(7.3)

SQL Injection in Category Management of itsourcecode News

CVE-2026-3135

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Database Compromise and Potential Privilege Escalation

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 SQL injection flaw in the /admin/add-category.php endpoint of the itsourcecode News Portal Project 1.0 allows manipulation of the Category parameter to interfere with database queries.

When exploited remotely, this can give an attacker the ability to read, modify, or delete data within the application's database and potentially escalate their privileges.

Affected context

The issue arises in the administrative category management feature exposed via /admin/add-category.php.

It affects deployments where user-supplied Category data reaches SQL queries without robust validation, escaping, or parameterization.

The vulnerability is most relevant in environments where the admin interface is exposed over the network and accounts or inputs can be influenced by untrusted users.

Exploit preconditions

  • Attack surface: HTTP(S) interface to /admin/add-category.php
  • Required access: Ability to send crafted requests that control the Category parameter (directly or via a browser session with admin access)
  • Trigger point: Server-side processing of Category during category creation or update, where it is concatenated into SQL statements
  • Why exploitation is possible: The application appears to interpolate raw Category input directly into SQL query strings without parameterized queries or rigorous input validation, enabling injection of attacker-controlled SQL fragments

Why this happens

This vulnerability stems from dynamically constructing SQL queries using untrusted Category input without proper query parameterization.

Instead of binding values as parameters, the code likely concatenates user input directly into the SQL string, enabling attackers to alter query structure.

This maps primarily to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), and secondarily to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, since the database is a downstream interpreter of the crafted input.

Potential impact

  • Attackers may extract sensitive information from database tables, such as user records or configuration data.
  • Malicious users could modify or delete content, including news posts, categories, or administrative data.
  • In some configurations, injected SQL may allow creation of new administrative accounts or privilege escalation.
  • Database corruption or service disruption can occur through destructive SQL operations.
  • If the database account has extended privileges, the attacker could potentially impact other schemas or application components sharing the same database.

General mitigation guidance

Mitigation should focus on treating all incoming Category values as untrusted and ensuring they cannot change SQL query structure.

Pattern-based defensive measures include:

  • Using parameterized queries or prepared statements for all database operations involving user-controlled input.
  • Applying strict server-side validation and normalization of category names (e.g., enforcing length limits and allowed character sets).
  • Centralizing database access logic in a data access layer that enforces safe query construction by default.
  • Minimizing database account privileges so that the web application can only perform the minimal set of operations required.
  • Implementing generic error handling that avoids exposing database error messages or stack traces to clients.

How teams detect issues like this

Detection generally involves a combination of code-level analysis and runtime testing:

  • Static analysis to flag any SQL query construction that uses string concatenation or interpolation with request parameters like Category.
  • Manual code review focused on database access layers and admin features, checking for the absence of prepared statements and the presence of raw input in queries.
  • Security testing (e.g., automated DAST or manual penetration testing) sending crafted Category values to observe unexpected SQL behavior or error messages.
  • Logging and monitoring of anomalous query patterns, such as unusual syntax, tautological conditions, or stacked queries, where supported by the database and logging infrastructure.

Sources

SourceLink
github.comgithub.com/910biter/cve/issues/2
itsourcecode.comitsourcecode.com/
vuldb.comvuldb.com/?ctiid.347630
vuldb.comvuldb.com/?id.347630
vuldb.comvuldb.com/?submit.758336

Frequently asked

questions

Yes. The vulnerable /admin/add-category.php endpoint is reachable over HTTP(S), and an attacker who can influence requests to this endpoint can attempt SQL injection remotely.

That depends on how access control is configured. If the admin panel requires authentication and is not otherwise exposed, the attacker would need to compromise or obtain an admin session or exploit any weakness in access controls to reach the vulnerable functionality.

The most robust fix is to refactor the affected code to use parameterized queries or prepared statements everywhere user input influences SQL, combined with strict server-side validation of input fields such as Category.

Adopt a standard data access layer that enforces prepared statements by default, treat all external input as untrusted, validate and sanitize inputs according to whitelists, and integrate static analysis and security testing into the development pipeline to flag unsafe query construction early.

Find out what's already
exploitable in your codebase.