Severity:

HIGH RISK

(7.3)

SQL Injection in Electronic Judging System edit_team.php

CVE-2026-9526

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Data Exposure and Integrity Compromise 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

A SQL injection flaw in the Electronic Judging System 1.0 allows untrusted input from the num_id parameter in /admin/edit_team.php to be incorporated directly into database queries.

When exposed over a network, a remote attacker can send crafted requests that manipulate these queries, potentially accessing, modifying, or deleting application data.

Affected context

The vulnerability occurs in the administrative functionality of the Electronic Judging System, specifically within /admin/edit_team.php, where the num_id argument is used to drive database operations.

It is present when the application constructs SQL queries using this parameter without adequate input validation or parameterization.

Any deployment that exposes the admin interface over HTTP/S and lacks strict access control or additional input filtering may be at risk.

Exploit preconditions

  • Attack surface: Network-accessible HTTP/S endpoint /admin/edit_team.php
  • Required access: Ability to send requests with controlled num_id values; in many setups, this may require admin or privileged access but could be exposed more broadly if access controls are weak
  • Trigger point: Processing of requests where num_id is interpolated into SQL statements
  • Why exploitation is possible: The application likely concatenates raw request parameters into SQL queries (CWE-89) and may accept unvalidated or improperly encoded input (CWE-74), allowing an attacker to alter query structure

Why this happens

The root cause is the construction of SQL statements by directly embedding user-supplied data from the num_id parameter into query strings.

Instead of using parameterized queries or prepared statements, the code likely concatenates or formats the parameter into SQL, enabling control characters and SQL syntax to influence the query.

This aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), and is related to CWE-74, where untrusted input is not properly neutralized before being used in a downstream interpreter.

Potential impact

  • Unauthorized reading of database records, including sensitive or personal data
  • Modification or deletion of team records and related judging data
  • Bypassing of application-level authorization checks by altering query conditions
  • Potential creation of new administrative or privileged accounts if the schema allows
  • Disruption of application functionality through tampering with core data

General mitigation guidance

Effective mitigation focuses on preventing untrusted input from altering SQL query structure.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for all database operations, especially those involving request parameters like num_id
  • Applying strict server-side validation and type enforcement (e.g., ensuring num_id is an integer and rejecting unexpected formats)
  • Implementing context-appropriate escaping or encoding for data that must be concatenated, while preferring parameterization wherever possible
  • Restricting database accounts to least-privilege, so even if a query is manipulated, the scope of accessible data and operations is reduced
  • Isolating administrative interfaces, placing them behind strong authentication and, where feasible, network-level access controls

How teams detect issues like this

Detection can combine code-level review and runtime monitoring:

  • Static analysis rules that flag string concatenation or formatting used to build SQL queries from request parameters, especially in admin modules
  • Code review checklists that require verification of parameterized queries for all database interactions involving user-controlled inputs
  • Database activity monitoring to detect anomalous queries containing unexpected operators, tautologies, or stacked commands originating from web requests
  • Web application security testing, including automated scanners configured to probe query parameters like num_id for SQL injection behavior

Sources

SourceLink
github.comgithub.com/i-QvQ-i/first-OvO/issues/2
itsourcecode.comitsourcecode.com/
vuldb.comvuldb.com/submit/814714
vuldb.comvuldb.com/vuln/365545
vuldb.comvuldb.com/vuln/365545/cti

Frequently asked

questions

Yes. If the /admin/edit_team.php endpoint is reachable over the network, an attacker can send crafted HTTP/S requests to exploit the SQL injection remotely.

At minimum, the attacker must be able to interact with the vulnerable endpoint and control the num_id parameter. In some deployments this may require authenticated access, but in others the admin interface could be more broadly exposed.

Refactor all database interactions using parameterized queries or prepared statements and enforce strict typing for parameters like num_id. Avoid building SQL statements via string concatenation or interpolation of raw request data.

Adopt a defensive coding standard that mandates parameterized queries, centralize database access through vetted helper functions, enforce robust input validation on all external data, and integrate security-focused code review and static analysis into the development process.

Find out what's already
exploitable in your codebase.