CVE-2026-82028: Magistrala < 1.0.0 SQL Injection via format Parameter in Reader API
Magistrala before 1.0.0 contains a SQL injection vulnerability in the timescale-reader and postgres-reader HTTP API services that allows authenticated attackers to inject arbitrary SQL by supplying a malicious format query parameter that is interpolated directly into the FROM clause without parameterization or identifier quoting. Attackers with a self-registered account can substitute arbitrary subqueries to achieve cross-tenant database reads, extract pgshadow password hashes, read and write arbitrary files, and execute arbitrary code as the postgres OS user by loading attacker-supplied shared objects, with all injected SQL executing at superuser privilege due to the default PostgreSQL role configuration.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Magistrala (timescale-reader, postgres-reader)to a version that resolves this vulnerability.Fixed in 1.0.0 - Compensating control
As a compensating control until upgrading, restrict network access to the timescale-reader and postgres-reader HTTP API services so only trusted clients/authenticated users can reach the Reader API endpoints that accept the malicious format query parameter.
Event History
Frequently Asked Questions
Who can exploit this vulnerability?
An authenticated attacker can exploit it, including someone who can create a self-registered account. The vulnerable entry points are the timescale-reader and postgres-reader HTTP API services.
What access does successful exploitation provide?
Injected SQL executes with PostgreSQL superuser privilege under the default role configuration. This can enable cross-tenant reads, extraction of pg_shadow password hashes, arbitrary file reads and writes, and code execution as the postgres OS user by loading attacker-supplied shared objects.
Are default deployments affected?
The described impact applies to the default PostgreSQL role configuration, where injected queries execute as a superuser. Magistrala versions before 1.0.0 are affected.