/

CVE-2026-26794

Severity:

HIGH RISK

(8.8)

SQL Injection in GL-iNet GL-AR300M16 add_group() Function

CVE-2026-26794

Modified

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary SQL Query Execution and Data Compromise

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

GL-iNet GL-AR300M16 v4.3.11 contains a SQL injection vulnerability in the add_group() function, which processes attacker-controlled data in backend database queries without sufficient sanitization.

By sending crafted HTTP requests, an attacker can manipulate the underlying SQL statements and execute arbitrary database operations on the device.

Affected context

The vulnerability appears in the web management interface of the GL-iNet GL-AR300M16 router (firmware v4.3.11), specifically in the server-side logic behind the add_group() functionality.

It is relevant when the device exposes its HTTP-based administration endpoints and user-supplied parameters are incorporated into SQL queries.

The issue becomes risky in deployments where the management UI is reachable from untrusted networks, or where an attacker can gain access to an administrative or semi-privileged HTTP session.

Exploit preconditions

  • Attack surface: HTTP interface of the router's web management/API endpoints.
  • Required access: Ability to send crafted HTTP requests to the affected endpoint; in many setups this may require network proximity or prior authentication, depending on how the interface is exposed.
  • Trigger point: Invocation of the add_group() function with maliciously crafted input parameters that are used in downstream SQL queries.
  • Why exploitation is possible: User input is concatenated or interpolated directly into SQL statements without robust parameterization or input validation, allowing attackers to alter query structure and logic.

Why this happens

The core issue is unsafely embedding external input into SQL statements, corresponding to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection).

Instead of using parameterized queries or prepared statements, the add_group() function appears to construct SQL commands dynamically using raw request parameters.

This pattern allows attackers to inject SQL control characters (such as quotes, logical operators, or additional clauses) that change the intended query behavior and enable arbitrary database operations.

Potential impact

  • Unauthorized reading of sensitive configuration or user data stored in the router's database.
  • Modification or deletion of records, including group definitions or access control information.
  • Creation of rogue accounts or groups that could aid further compromise.
  • Potential escalation to full administrative control of the device's management features.
  • Disruption of router functionality leading to denial of service or unstable behavior.

General mitigation guidance

Effective mitigation focuses on eliminating direct string-based SQL construction and tightening trust boundaries around input used in database operations.

Recommended patterns include:

  • Using parameterized queries or prepared statements for all database access paths, ensuring that user input is treated strictly as data.
  • Applying strict server-side validation and normalization on all parameters consumed by add_group() (e.g., enforcing allowed character sets and length constraints).
  • Isolating database privileges so the account used by the application has only the minimal rights required to manage groups, reducing the blast radius of a successful injection.
  • Segmenting and restricting network access to the management interface so it is not reachable from untrusted networks by default.
  • Applying defense-in-depth controls such as web application firewalls configured to detect and block common SQL injection patterns.

How teams detect issues like this

High-level detection approaches for this type of flaw include:

  • Static analysis rules that flag dynamic SQL string construction involving HTTP request parameters or other external input in the router's web backend code.
  • Manual secure code review focused on the add_group() flow and related database access functions, verifying that all queries use bind parameters and that validation is centralized.
  • Runtime monitoring of database queries for anomalous patterns (e.g., unexpected tautologies, UNIONs, or stacked statements originating from the add_group endpoint).
  • HTTP log analysis to identify suspicious request patterns containing SQL metacharacters or typical injection payload structures.
  • Incorporation of automated security testing tools (e.g., DAST scanners) into development and QA workflows to exercise the management API and detect injection behaviors.

Sources

SourceLink
github.comgithub.com/sezangel/IOT-vul/tree/main/GL-iNet/GL-AR300M16/acl--add_group

Frequently asked

questions

It can be, if the router's web management interface is exposed to the internet or an attacker-controlled network segment. If the interface is restricted to a local or VPN-only network, then the attacker must first gain access to that network.

That depends on how the vulnerable endpoint is protected. If add_group() is behind an authenticated admin session, the attacker would need valid credentials or another way to hijack a session. If misconfiguration or design exposes it without strong authentication, unauthenticated exploitation may be possible.

Refactor the database access in add_group() to use parameterized queries or prepared statements exclusively, and ensure that all user-controlled values are bound parameters rather than being concatenated into SQL strings. Combine this with strict server-side validation of group-related inputs.

Adopt a development standard that prohibits dynamic SQL string construction with raw input, requires parameterized queries by default, and mandates security-focused code review on all data access layers. Supplement these practices with automated static analysis and regular security testing of web-facing functionality.

Find out what's already
exploitable in your codebase.