Skip to content

An SQL injection issue related to the orderBy clause.

High
wanghe-fit2cloud published GHSA-5grx-v727-qmq6 Jul 18, 2024

Package

No package listed

Affected versions

v1.10.9-lts

Patched versions

v1.10.12-tls

Description

Summary

There are many sql injections in the project, and some of them are not well filtered, leading to arbitrary file writes, and ultimately leading to RCEs.
The proof is as follows

Details (one of them )

image image image

PoC

curl 'http://api:30455/api/v1/hosts/command/search' {"page":1,"pageSize":10,"groupID":0,"orderBy":"3","order":"ascending","name":"a"}
image
for example as picture . just change orderby‘s num we can know How many columns does the data table have.Parameters require strict whitelist filtering

Impact

RCE、data leak.

Severity

High

CVE ID

CVE-2024-39907

Weaknesses

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Learn more on MITRE.

Credits