Bug 2513586 (CVE-2026-19496) - CVE-2026-19496 sources-api-go: sources-api-go: SQL injection (CWE-89) in query parameter filtering — unsanitised user input interpolated into WHERE clause
Summary: CVE-2026-19496 sources-api-go: sources-api-go: SQL injection (CWE-89) in quer...
Keywords:
Status: NEW
Alias: CVE-2026-19496
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-08-10 18:12 UTC by OSIDB Bzimport
Modified: 2026-08-10 18:42 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-08-10 18:12:13 UTC
A SQL injection vulnerability was found in sources-api-go. The applyFilters() function builds GORM Where() clauses by string-formatting the caller-supplied column name into SQL. middleware/filtering.go passes any query-parameter key that is not limit, offset, or sort_by into filter.Name with no sanitisation, allowing arbitrary SQL expressions to be injected into the WHERE clause. The sort_by parameter is also passed to query.Order() via string concatenation.

Any authenticated console.redhat.com user can inject SQL through query parameter filtering, leading to information disclosure of internal database fields and schema details, arbitrary PostgreSQL function execution through the WHERE clause, SQL error details returned in HTTP responses, and denial of service from expensive SQL expressions.

Affected code:
- middleware/filtering.go:63-77 — raw query-param key becomes filter.Name with no sanitisation
- dao/filtering.go:65,80-83 — column name string-concatenated into WHERE clause
- dao/filtering.go:114-117 — sort_by value passed to query.Order() via string concatenation

Confirmed on staging.

Upstream issue: https://redhat.atlassian.net/browse/RHCLOUD-49586


Note You need to log in before you can comment on or make changes to this bug.