/

CVE-2026-28805

Severity:

HIGH RISK

(8.8)

SQL Injection in OpenSTAManager AJAX Select Handlers

CVE-2026-28805

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Authenticated Data Exfiltration via Time-Based Blind 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

OpenSTAManager contains a time-based blind SQL injection vulnerability in multiple AJAX select handlers where the options[stato] GET parameter is concatenated directly into SQL WHERE clauses.

An authenticated attacker can abuse this flaw to inject arbitrary SQL expressions, enabling extraction of sensitive data such as usernames, password hashes, and financial records from the underlying MySQL database.

Affected context

The vulnerability occurs in OpenSTAManager deployments where AJAX select handlers process the options[stato] GET parameter and use its value to dynamically build SQL WHERE clauses.

It manifests when the application reads $_GET['options']['stato'] into $superselect['stato'] and interpolates it as a raw expression in SQL queries without sanitization, prepared statements, or allowlist checks.

Any instance exposing these AJAX endpoints to authenticated users and backed by a MySQL database may be affected, depending on how access controls and roles are configured.

Exploit preconditions

  • Attack surface: HTTP(S) AJAX endpoints that use options[stato] to filter database results.
  • Required access: Valid authenticated user account with permission to reach the vulnerable AJAX select handlers.
  • Trigger point: Submission of crafted values in the options[stato] GET parameter during AJAX requests.
  • Why exploitation is possible: The user-controlled value is copied into $superselect['stato'] and concatenated into the SQL query as a bare expression.

Because no parameterization, escaping, or allowlisting is applied, the database interprets the injected content as part of the SQL logic, enabling time-based blind inference attacks.

Why this happens

This vulnerability stems from constructing SQL queries by string concatenation using untrusted input from options[stato].

The application treats the user value as a ready-to-use SQL fragment, embedding it directly in the WHERE clause without prepared statements or explicit validation.

This pattern maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where attacker-controlled data is allowed to change the structure and behavior of SQL queries.

The "time-based blind" aspect arises because results are inferred from response timing rather than direct error or content leakage, but the underlying bug class remains unsafe dynamic query building.

Potential impact

  • Extraction of sensitive data from the MySQL database, including customer records, financial data, and operational metadata.
  • Retrieval of usernames, email addresses, and password hashes, which can facilitate account takeover when combined with offline cracking.
  • Enumeration of database schema, tables, and columns to support broader data-mining attacks.
  • Potential manipulation of application data (e.g., altering records) if injected statements are not fully constrained by the query context.
  • Indirect escalation of privileges if sensitive configuration or session-related data is stored in the same database.

General mitigation guidance

Effective mitigation focuses on eliminating dynamic SQL built from untrusted input and enforcing strict separation between data and query logic.

Recommended defensive patterns include:

  • Replacing string-concatenated queries with parameterized queries or prepared statements, ensuring user input can only be treated as data.
  • Introducing allowlists for state or status fields such as stato, mapping incoming values to a known set of internal constants instead of passing raw expressions through.
  • Centralizing query-building routines so that all AJAX handlers use shared, vetted data-access layers rather than ad-hoc SQL fragments.
  • Applying least-privilege database accounts so that application-level queries are limited to only the operations and tables they truly require.
  • Implementing input validation layers that reject malformed or unexpected values early, before any interaction with the database layer.

How teams detect issues like this

Identifying this class of vulnerability can be done through a combination of code-centric and behavior-based techniques:

  • Static analysis: Scan the codebase for SQL construction that embeds $_GET, $_POST, or similar superglobals directly into query strings, especially occurrences of $superselect['stato'] and related variables.
  • Code review: Flag any use of concatenation or interpolation in SQL statements within AJAX handlers; pay close attention to fields intended to represent conditions or expressions rather than simple scalar values.
  • Dynamic testing: Use automated security testing tools or scripts to send crafted options[stato] values and observe response timings indicative of time-based SQL injection behavior.
  • Policy enforcement: Adopt secure coding guidelines that mandate the use of parameterized queries and allowlists for filter parameters, enforced via pull request templates and CI checks.

Many SAST/DAST tools can be tuned with rules that specifically detect unsafe SQL construction patterns in PHP applications.

Sources

SourceLink
github.comgithub.com/devcode-it/openstamanager/commit/50b9089c506ba2ca249afb1dfead2af5d42c10e7
github.comgithub.com/devcode-it/openstamanager/commit/679c40fa5b3acad4263b537f367c0695ff9666dc
github.comgithub.com/devcode-it/openstamanager/releases/tag/v2.10.2
github.comgithub.com/devcode-it/openstamanager/security/advisories/GHSA-3gw8-3mg3-jmpc

Frequently asked

questions

Yes, if the OpenSTAManager instance is exposed over the network and an attacker can obtain valid credentials, they can send crafted AJAX requests to the vulnerable endpoints to exploit the SQL injection remotely.

Exploitation requires an authenticated user with access to the affected AJAX select handlers.

The exact privilege level depends on how the application's roles and menus are configured, but the flaw is not exploitable by unauthenticated users by default.

The most robust fix is to replace all string-concatenated SQL that incorporates options[stato] with parameterized queries, and to treat stato as a constrained value mapped through an allowlist.

Avoid passing user data directly into SQL expressions and use a shared, well-tested data access layer for all AJAX handlers.

Adopt a development policy that prohibits raw SQL concatenation with user input, enforce prepared statements by default in the database layer, and introduce centralized validation/allowlist logic for all filter parameters.

Combine these standards with automated static analysis and regular security code reviews to catch unsafe patterns early in the development cycle.

Find out what's already
exploitable in your codebase.