CVE-2024-39907: 1Panel has an SQL injection issue related to the orderBy clause
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.98373%
CWE
Published
7/18/2024
Updated
8/3/2024
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/1Panel-dev/1Panel | go | < 1.10.12-tls | 1.10.12-tls |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from unvalidated 'orderBy' parameters in multiple DTOs being passed to GORM's Order()
method. The patch added 'oneof' validation to OrderBy fields, indicating previous lack of input filtering. Functions handling these parameters (e.g., cronjob API handlers and service methods) directly used user input in SQL ORDER BY clauses through GORM, enabling column count enumeration and SQL injection. The PoC demonstrates injection via orderBy=3, which would map to unvalidated column references in vulnerable versions.