Description (CNA)
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.
Affected (CNA)
| Vendor / product | Versions |
|---|---|
| absmach / magistrala | affected 0 through * |
CWE
CWE-89
References
- https://github.com/absmach/magistrala
- https://github.com/absmach/magistrala/blob/main/readers/postgres/messages.go
ADP enrichment
No English description supplied.
No references supplied.