/

CVE-2026-34100

Severity:

HIGH RISK

(8.8)

SQL Injection (CWE-89) in Guardian media.php Query

CVE-2026-34100

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Authentication-bound Data Exfiltration via SQL Injection

Severity:

HIGH RISK

(8.8)

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

Guardian language-system contains an SQL injection flaw where the id GET parameter is concatenated directly into a database query in media.php without any sanitization or binding.

An authenticated attacker can exploit this error-based injection point to extract sensitive database contents whenever the vulnerable query is executed.

Affected context

The vulnerability occurs in the Guardian language-system when handling requests to media.php that include an id parameter.

It is present in deployments where user-supplied identifiers are interpolated directly into SQL statements, and the database error output or behavior is observable by authenticated users.

Systems that rely on this query to retrieve media metadata without additional access controls are particularly exposed, as the query executes with full database privileges associated with the application account.

Exploit preconditions

  • Attack surface: HTTP requests to media.php using the id GET parameter
  • Required access: Valid authenticated session within the Guardian language-system
  • Trigger point: Execution of the SQL query SELECT id, filename, extension, type, duration, owner, private FROM files where id = '<user-controlled value>'
  • Why exploitation is possible: The id parameter is directly concatenated into the SQL statement without input validation or prepared statements, allowing crafted input to alter query structure and leverage error-based responses to extract data

Why this happens

The underlying bug is direct string concatenation of untrusted input into an SQL query, a classic instance of CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection).

Instead of using parameterized queries or input binding, the application builds the query dynamically with $_GET['id'], giving attackers control over the query syntax.

This insecure pattern allows data retrieval beyond the intended single-record lookup, and any exposed database errors can be iteratively used to infer or extract schema and content.

Potential impact

  • An attacker may extract user records, credentials, or other sensitive tables from the database.
  • An attacker could enumerate database schemas, table names, and column structures.
  • The vulnerability can allow bypass of logical access controls enforced at the application layer.
  • Depending on database configuration, an attacker could modify or delete records, impacting data integrity.
  • In some environments, SQL injection can be chained into further escalation, such as writing files or invoking dangerous database functions.

General mitigation guidance

Effective mitigation centers on removing direct concatenation of user input into SQL and designing queries to be declarative and parameterized by default.

Common defensive patterns include:

  • Using prepared statements with bound parameters for all database interactions, treating input as data rather than query logic.
  • Applying strict input validation on identifier parameters (e.g., numeric IDs), reducing accepted formats to the minimal necessary.
  • Centralizing database access through a well-reviewed data access layer that enforces parameterization and discourages ad-hoc query construction.
  • Running the application with least-privilege database accounts, limiting what a compromised query can read or modify.
  • Implementing secure-by-default coding standards where any deviation from parameterized queries is flagged during review.

How teams detect issues like this

Detection typically involves combining static analysis, code review, and runtime monitoring to identify unsafe SQL usage patterns.

Useful approaches include:

  • Static analysis rules that flag queries built via string concatenation or interpolation using request parameters such as $_GET or $_POST.
  • Code review checklists that require verification of prepared statements and explicit rejection of inline SQL construction with user input.
  • Application security testing (including automated scanners) aimed at injecting SQL meta-characters and observing error messages or response anomalies.
  • Logging and monitoring of unusual query patterns, such as unexpected operators, UNION clauses, or multi-statement queries issued by the application account.
  • Organizational policies that mandate the use of parameterized query APIs and integrate checks into CI/CD pipelines.

Sources

SourceLink
gist.github.comgist.github.com/cyberinforepo/d5b2771d82e1b31b8fc1c33052e08dad
vulncheck.comvulncheck.com/advisories/guardian-language-system-unauthenticated-sql-injection-via-id-parameter-in-media-php

Frequently asked

questions

Exploitation is limited to authenticated users of the Guardian language-system, but any such user with access to media.php can leverage the injection point to perform error-based data extraction, potentially affecting all records the application account can access.

The attacker needs a valid authenticated session and the ability to send crafted requests containing the id GET parameter to media.php. No additional privileges are required beyond reaching the vulnerable endpoint.

Replace dynamic string concatenation with parameterized queries throughout the codebase, ensuring that all user-controlled input is bound as parameters rather than embedded in query text, and complement this with strict input validation for identifier fields.

Adopt secure coding standards that mandate prepared statements, integrate static analysis and security-focused code review into the development process, and design database schemas and permissions with least privilege so that any single query exposure has limited blast radius.

Find out what's already
exploitable in your codebase.