CVE-2026-71276
Full vulnerability record from the local CVENow database.
Description
Magistrala (formerly Mainflux)'s message-readers API reads a 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: ) and the TimescaleDB reader (readers/timescale/messages.go, same pattern), enabling SQL injection by any authenticated user able to query channel messages.
Severity
HIGH
CVSS score
7.1
(v3.1)
Vulnerability status
Deferred
Source identifier
309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c
Published
2026-08-05 13:24:52.080000
Last modified
2026-10-23 21:10:00.157000
View original CVE JSON
{
"id": "CVE-2026-71276",
"sourceIdentifier": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c",
"published": "2026-08-05T13:24:52.080",
"lastModified": "2026-10-23T21:10:00.157",
"vulnStatus": "Deferred",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "Magistrala (formerly Mainflux)'s message-readers API reads a 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: ) and the TimescaleDB reader (readers/timescale/messages.go, same pattern), enabling SQL injection by any authenticated user able to query channel messages."
},
{
"lang": "es",
"value": "La API de lectura de mensajes de Magistrala (anteriormente Mainflux) lee un valor ’format’ de la cadena de consulta HTTP (readers/api/http/transport.go) sin validación y lo interpola directamente en consultas SQL sin procesar a través de fmt.Sprintf() tanto en el lector de PostgreSQL (readers/postgres/messages.go: ’fmt.Sprintf(“SELECT * FROM %s WHERE %s ...”, format, cond)’) como en el lector de TimescaleDB (readers/timescale/messages.go, el mismo patrón), lo que permite la inyección SQL por cualquier usuario autenticado capaz de consultar mensajes de canal."
}
],
"affected": [
{
"source": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c",
"affectedData": [
{
"vendor": "absmach",
"product": "magistrala",
"defaultStatus": "unaffected",
"programFiles": [
"readers/postgres/messages.go",
"readers/timescale/messages.go"
],
"versions": [
{
"version": "0",
"lessThanOrEqual": "*",
"versionType": "custom",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N",
"baseScore": 7.1,
"baseSeverity": "HIGH",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "LOW",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "LOW",
"availabilityImpact": "NONE"
},
"exploitabilityScore": 2.8,
"impactScore": 4.2
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-08-05T15:55:35.305885Z",
"id": "CVE-2026-71276",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-89"
}
]
}
],
"references": [
{
"url": "https://github.com/absmach/magistrala",
"source": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c"
},
{
"url": "https://github.com/absmach/magistrala/blob/main/readers/postgres/messages.go",
"source": "309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c"
}
]
}