CVE-2022-3802:
IBAX go-ibax vulnerable to SQL injection
8.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.13655%
CWE
Published
11/1/2022
Updated
4/24/2024
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/IBAX-io/go-ibax | go | < 1.4.2 | 1.4.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from unsanitized use of the 'where' parameter in SQL query construction. In GetRowsInfo, the code uses fmt.Sprintf to directly insert user-controlled 'where' input into the SQL string (line 189 in original code). This allows attackers to inject arbitrary SQL commands. The getOpenRowsInfoHandler exposes this vulnerability via an API endpoint, as shown in the POC where pg_sleep() was injected. The commit fixed this by removing the entire database.go file containing these functions, indicating they were the attack surface.