Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

Authenticated (user role) SQL injection in `OrderAndPaginate` (GHSL-2023-270)

CVSS 3.1 7.0 HIGHEUVD CVSS 3.1 7.0 CVSS 3.1 · [email protected] · Secondary 7.0 HIGHCVSS 3.1 · [email protected] · Primary 6.5 MEDIUMCVSS_V3 Publisher rating HIGHFixed by github.com/0xJacky/Nginx-UI 1.9.10-0.20231219195202-ec93ab05a3ecosv · severity unknownFixed by github.com/0xJacky/Nginx-UI 1.9.10-0.20231219195202-ec93ab05a3ecKEV status unknown

cve-program · CVE-2024-22196

Published

Nginx-UI is an online statistics for Server Indicators​​ Monitor CPU usage, memory usage, load average, and disk usage in real-time. This issue may lead to information disclosure. By using `DefaultQuery`, the `"desc"` and `"id"` values are used as default values if the query parameters are not set. Thus, the `order` and `sort_by` query parameter are user-controlled and are being appended to the `order` variable without any sanitization. This issue has been patched in version 2.0.0.beta.9.

Read the publisher's advisory

euvd · EUVD-2024-0362

Published

Nginx-UI is an online statistics for Server Indicators​​ Monitor CPU usage, memory usage, load average, and disk usage in real-time. This issue may lead to information disclosure. By using `DefaultQuery`, the `"desc"` and `"id"` values are used as default values if the query parameters are not set. Thus, the `order` and `sort_by` query parameter are user-controlled and are being appended to the `order` variable without any sanitization. This issue has been patched in version 2.0.0.beta.9.

Read the publisher's advisory

nvd · CVE-2024-22196

Published

Nginx-UI is an online statistics for Server Indicators​​ Monitor CPU usage, memory usage, load average, and disk usage in real-time. This issue may lead to information disclosure. By using `DefaultQuery`, the `"desc"` and `"id"` values are used as default values if the query parameters are not set. Thus, the `order` and `sort_by` query parameter are user-controlled and are being appended to the `order` variable without any sanitization. This issue has been patched in version 2.0.0.beta.9.

Read the publisher's advisory

osv · GHSA-h374-mm57-879c

Published

### Summary The [`OrderAndPaginate`](https://github.com/0xjacky/nginx-ui/blob/04bf8ec487f06ab17a9fb7f34a28766e5f53885e/model/model.go#L99C4) function is used to order and paginate data. It is defined as follows: ```go func OrderAndPaginate(c *gin.Context) func(db *gorm.DB) *gorm.DB { return func(db *gorm.DB) *gorm.DB { sort := c.DefaultQuery("order", "desc") order := fmt.Sprintf("`%s` %s", DefaultQuery(c, "sort_by", "id"), sort) db = db.Order(order) ... } } ``` By using [`DefaultQuery`](https://github.com/0xjacky/nginx-ui/blob/04bf8ec487f06ab17a9fb7f34a28766e5f53885e/model/model.go#L278-L287), the `"desc"` and `"id"` values are used as default values if the query parameters are not set. Thus, the `order` and `sort_by` query parameter are user-controlled and are being appended to the `order` variable without any sanitization. The same happens with [`SortOrder`](https://github.com/0xjacky/nginx-ui/blob/04bf8ec487f06ab17a9fb7f34a28766e5f53885e/model/model.go#L91), but it doesn't seem to be used anywhere. ```go func SortOrder(c *gin.Context) func(db *gorm.DB) *gorm.DB { return func(db *gorm.DB) *gorm.DB { sort := c.DefaultQuery("order", "desc") order := fmt.Sprintf("`%s` %s", DefaultQuery(c, "sort_by", "id"), sort) return db.Order(order) } } ``` This issue was found using CodeQL for Go: [Database query built from user-controlled sources](https://codeql.github.com/codeql-query-help/go/go-sql-injection/). #### Proof of Concept > Based on [this setup](https://github.com/0xJacky/nginx-ui/blob/04bf8ec487f06ab17a9fb7f34a28766e5f53885e/README.md?plain=1#L210) using `uozi/nginx-ui:v2.0.0-beta.7`. In order to exploit this issue, we need to find a place where the `OrderAndPaginate` function is used. We can find it in the `GET /api/dns_credentials` endpoint. ```go func GetDnsCredentialList(c *gin.Context) { cosy.Core[model.DnsCredential](c).SetFussy("provider").PagingList() } ``` The `PagingList` function is defined as follows: ```go func (c *Ctx[T]) PagingList() { data, ok := c.PagingListData() if ok { c.ctx.JSON(http.StatusOK, data) } } ``` And the `PagingListData` function is defined as follows: ```go func (c *Ctx[T]) PagingListData() (*model.DataList, bool) { result, ok := c.result() if !ok { return nil, false } result = result.Scopes(c.OrderAndPaginate()) ... } ``` Using the following request, an attacker can retrieve arbitrary values by checking the order used by the query. That is, the result of the comparison will make the response to be ordered in a specific way. ```http GET /api/dns_credentials?sort_by=(CASE+WHEN+(SELECT+1)=1+THEN+id+ELSE+updated_at+END)+ASC+--+ HTTP/1.1 Host: 127.0.0.1:8080 Authorization: <<JWT TOKEN> ``` You can notice the order change by changing `=1` to `=2`, and so the comparison will return `false` and the order will be `updated_at` instead of `id`. ### Impact This issue may lead to `Information Disclosure`

Read the publisher's advisory

osv · GO-2024-2463

Published

SQL injection in github.com/0xJacky/Nginx-UI

Read the publisher's advisory

Affected versions, risk and source history

cve-program · CVE-2024-22196

Published

nginx-ui

Vendor product

Publisher's version information

Shown as published. These rules are not interpreted as NuGet package version ranges.

{
                    "vendor": "0xJacky",
                    "product": "nginx-ui",
                    "versions": [
                        {
                            "version": "< 2.0.0.beta.9",
                            "status": "affected"
                        }
                    ]
                }

Original source record · Cite this exact observation · Complete original publisher JSON

euvd · EUVD-2024-0362

Published

EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.

Original publisher date fields

datePublished: Jan 11, 2024, 7:24:07 PM

dateUpdated: Jun 17, 2025, 9:09:16 PM

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

nvd · CVE-2024-22196

Published

NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.

Source analysis status: Modified

Weakness classifications: CWE-89

Original publisher date fields

published: 2024-01-11T20:15:44.923

lastModified: 2026-06-17T07:10:55.050

14 source CPE criteria · context only
  • cpe:2.3:a:nginxui:nginx_ui:*:*:*:*:*:*:*:*
  • cpe:2.3:a:nginxui:nginx_ui:2.0.0:beta1:*:*:*:*:*:*
  • cpe:2.3:a:nginxui:nginx_ui:2.0.0:beta2:*:*:*:*:*:*
  • cpe:2.3:a:nginxui:nginx_ui:2.0.0:beta3:*:*:*:*:*:*
  • cpe:2.3:a:nginxui:nginx_ui:2.0.0:beta4:*:*:*:*:*:*
  • cpe:2.3:a:nginxui:nginx_ui:2.0.0:beta4_patch:*:*:*:*:*:*
  • cpe:2.3:a:nginxui:nginx_ui:2.0.0:beta5:*:*:*:*:*:*
  • cpe:2.3:a:nginxui:nginx_ui:2.0.0:beta5_patch:*:*:*:*:*:*
  • cpe:2.3:a:nginxui:nginx_ui:2.0.0:beta6:*:*:*:*:*:*
  • cpe:2.3:a:nginxui:nginx_ui:2.0.0:beta6_patch:*:*:*:*:*:*
  • cpe:2.3:a:nginxui:nginx_ui:2.0.0:beta6_patch2:*:*:*:*:*:*
  • cpe:2.3:a:nginxui:nginx_ui:2.0.0:beta7:*:*:*:*:*:*
  • cpe:2.3:a:nginxui:nginx_ui:2.0.0:beta8:*:*:*:*:*:*
  • cpe:2.3:a:nginxui:nginx_ui:2.0.0:beta8_patch:*:*:*:*:*:*

The original JSON retains the logical configuration operators, exclusions and version bounds.

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

osv · GHSA-h374-mm57-879c

Published

github.com/0xJacky/Nginx-UI

Go

SEMVER · introduced 0 → fixed 1.9.10-0.20231219195202-ec93ab05a3ec

Original source record · Cite this exact observation · Complete original publisher JSON

osv · GO-2024-2463

Published

github.com/0xJacky/Nginx-UI

Go

SEMVER · introduced 0 → fixed 1.9.10-0.20231219195202-ec93ab05a3ec

Original source record · Cite this exact observation · Complete original publisher JSON

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 25 Nov 17:45 UTC · 277 of 278 readable · 272 fully read · documentation 469/469 current