Skip to main content

Magistrala CVE-2026-71276

| EUVDEUVD-2026-53361 HIGH
SQL Injection (CWE-89)
2026-08-05 TuranSec GHSA-pwc8-43hr-jg4j
7.1
CVSS 3.1 · Vendor: TuranSec
Share

Severity by source

Vendor (TuranSec) PRIMARY
7.1 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
vuln.today AI
7.1 HIGH

Network-accessible API requires only a low-privilege authenticated session (PR:L); table-name injection position constrains write-path impact to I:L; no availability impact in a read-path query context.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (TuranSec).

CVSS VectorVendor: TuranSec

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

Lifecycle Timeline

2
Analysis Generated
Aug 05, 2026 - 13:41 vuln.today
CVE Published
Aug 05, 2026 - 12:26 cve.org
HIGH 7.1

DescriptionCVE.org

Magistrala (formerly Mainflux)'s message-readers API reads a format value from the HTTP query string (readers/api/http/transport.go) with no validation and interpolates it directly into raw SQL queries via fmt.Sprintf() in both the PostgreSQL reader (readers/postgres/messages.go: fmt.Sprintf("SELECT * FROM %s WHERE %s ...", format, cond)) and the TimescaleDB reader (readers/timescale/messages.go, same pattern), enabling SQL injection by any authenticated user able to query channel messages.

AnalysisAI

SQL injection in Magistrala's message-readers API exposes PostgreSQL and TimescaleDB backends to arbitrary query manipulation by any authenticated platform user. The unvalidated format HTTP query parameter is interpolated directly into raw SQL at the table-name identifier position via Go's fmt.Sprintf() in both readers/postgres/messages.go and readers/timescale/messages.go, enabling exfiltration of database contents with high confidentiality impact (CVSS C:H). The wildcard CPE (cpe:2.3:a:absmach:magistrala:*) indicates all known versions are affected; no vendor-released patch has been confirmed in available references, and no public exploit code or CISA KEV listing has been identified at time of analysis.

Technical ContextAI

Magistrala (formerly Mainflux) is an open-source IoT messaging and device-management platform by absmach. The vulnerability is a CWE-89 (Improper Neutralization of Special Elements used in an SQL Command) flaw originating in the HTTP transport layer at readers/api/http/transport.go, which reads the format query string parameter and passes it unsanitized downstream. Both the PostgreSQL reader (readers/postgres/messages.go) and TimescaleDB reader (readers/timescale/messages.go) construct raw SQL using the pattern fmt.Sprintf("SELECT * FROM %s WHERE %s ...", format, cond). Because the injection occurs at the SQL identifier (table name) position rather than a value position, standard parameterized query drivers cannot protect against it - PostgreSQL does not support bind parameters for identifiers. This means the only correct fix is allowlist validation of the format value before query construction. Depending on the Go PostgreSQL driver configuration, stacked queries or subquery-based exfiltration techniques may be feasible.

RemediationAI

No vendor-released patch has been identified at time of analysis - available references point only to the upstream repository and vulnerable source files, with no fixed release or security advisory noted. Operators should immediately restrict access to the message-readers API endpoint to the minimum set of authenticated principals required, enforced at the API gateway or network-policy layer. As a code-level compensating control, developers should implement strict allowlist validation on the format parameter before it reaches the SQL construction path - reject any value not matching the exact set of expected table identifiers using a map or switch statement; do not use regex alone, as bypass risk exists. Since PostgreSQL does not support parameterized identifiers, driver-level escaping is insufficient and the allowlist is the only sound fix. Monitor the upstream repository at https://github.com/absmach/magistrala for a patched release. Enabling PostgreSQL statement-level logging can help detect exploitation attempts in the interim.

CVE-2025-1094 HIGH POC
8.1 Feb 13

PostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl

CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2013-1899 MEDIUM POC
6.5 Apr 04

Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re

CVE-2026-20253 CRITICAL POC
9.8 Jun 10

Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.

CVE-2026-9586 CRITICAL POC
9.3 Jul 17

Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar

CVE-2017-7546 CRITICAL
9.8 Aug 16

PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow

CVE-2015-1352 MEDIUM POC
5.0 Mar 30

The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t

CVE-2024-10553 CRITICAL POC
9.8 Mar 20

A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra

CVE-2019-9193 HIGH POC
7.2 Apr 01

In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve

CVE-2026-40887 CRITICAL POC
9.1 Apr 14

Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the

CVE-2022-24760 CRITICAL POC
10.0 Mar 12

Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot

CVE-2025-56157 CRITICAL POC
9.8 Dec 18

Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al

Share

CVE-2026-71276 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy