
Advisory and technical write-up for CVE-2026-18782, a critical SQL injection in TREX MES web API endpoints enabling auth bypass, data theft, and RCE via xp_cmdshell.
TREX MES is a commercial Manufacturing Execution System (MES) / Industry 4.0 platform used to collect and manage data from the production floor. The application's web API executes the client-supplied sql parameter directly on the backend Microsoft SQL Server and returns the result set as JSON.
A low-privileged authenticated user — or any attacker who obtains a session token through the authentication bypass described below — can:
xp_cmdshell. In the tested installation, this account holds the SeImpersonatePrivilege privilege, which allows escalation to NT AUTHORITY\SYSTEM and full compromise of the server, providing a foothold for lateral movement into the internal network.Since the affected system is a manufacturing execution platform, the ability to silently alter production and quality records carries an operational and business continuity risk beyond conventional IT impact.
The same API's login flow selects the Password column and returns it to the browser, and the password comparison is performed client-side. Combined with the query vulnerability above, a UNION-based statement sent through the username field makes it possible to inject a synthetic record with an attacker-chosen password and admin flag, resulting in a full authentication bypass without knowledge of any valid credentials. This behavior was verified in the tested installation.
Critical — CVSS 3.1 Base Score 9.9 (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H)
trex MES v.6.07.17.00090 and earlier
TrexDCAS MES v.6.05.14.00074 and earlier
/api/GetDataJSON3 and /api/GetDataJSONCrypto3 — the client-supplied sql parameter handling logic in the web service layer
Until the vendor releases a fix, operators are advised to implement the following:
xp_cmdshell feature (sp_configure 'xp_cmdshell', 0) and review other components that enable command execution, such as OLE Automation Procedures and CLR integration.sysadmin role from the application's database account and grant only the minimum required object-level permissions.For a permanent fix, the vendor must move query construction to the server side using parameterized statements, perform authentication on the server, and store passwords using a salted, computationally expensive hash algorithm.
CVE-2026-18782
Hasan Hüseyin UYAR – Netlore Security
| Date | Event |
|---|---|
| 2026-07-30 | The vulnerability was detected and verified during an authorized penetration test |
| 2026-08-04 | CVE-2026-18782 ID was assigned. |
| 2026-09-30 | Published with the ID https://www.cve.org/CVERecord?id=CVE-2026-18782. |