CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-42223

CVE-2026-42223: Authenticated Sensitive Information Disclosure in Nginx UI

Alon Barad
Alon Barad
Software Engineer

May 6, 2026·7 min read·22 visits

Executive Summary (TL;DR)

Any authenticated user can retrieve administrative secrets (including the JWT signing key) due to flawed struct serialization, enabling total application compromise and privilege escalation.

Nginx UI versions prior to 2.3.8 suffer from an asymmetric security control enforcement vulnerability. Go's standard JSON marshaler ignores custom struct tags meant to protect sensitive configuration fields, leading to the exposure of JWT secrets, node secrets, and OIDC client credentials to any authenticated user. This allows privilege escalation to full administrator.

Vulnerability Overview

Nginx UI operates as a web-based management interface for Nginx web servers, providing administrators with tools to configure routing, manage certificates, and monitor server performance. The application relies on a Go-based backend providing RESTful API endpoints consumed by a frontend application. Authentication and authorization are handled via JSON Web Tokens (JWT), with specific administrative privileges required for configuration changes.

CVE-2026-42223 manifests as a CWE-200 vulnerability within the application's configuration management API. The backend exposes an endpoint designed to serve application settings to the frontend. Due to a failure in how Go struct fields are serialized into JSON, this endpoint inadvertently leaks highly sensitive cryptographic secrets to any authenticated user.

Exploitation requires a low-privileged authenticated session. Unauthenticated attackers cannot reach the vulnerable code path due to middleware enforcement. However, any user with valid credentials, regardless of their assigned role or permission boundaries, can trigger the vulnerability by interacting directly with the API.

The resulting data exposure provides the attacker with the necessary cryptographic keys to forge administrative sessions. This bypasses the application's role-based access control (RBAC) mechanisms. The severity is quantified by a CVSS 3.1 score of 6.5, reflecting the authentication prerequisite but acknowledging the high impact on confidentiality.

Root Cause Analysis

The vulnerability is rooted in an asymmetry between how Nginx UI processes incoming configuration changes versus how it serves outgoing configuration data. The Go backend utilizes global struct definitions to maintain application state and settings in memory. Developers attempted to secure sensitive fields within these structs by applying a custom struct tag, specifically protected:"true".

During write operations handled by the SaveSettings function, the application employs a custom function named ProtectedFill. This function uses Go's reflect package to inspect the struct tags dynamically. It identifies fields marked with protected:"true" and prevents user-supplied input from overwriting existing secrets, operating as an effective defense mechanism against unauthorized configuration tampering.

The failure occurs in the read operation handled by GetSettings located in api/settings/settings.go. To serve the settings data, the handler passes the global struct directly to the Gin web framework's c.JSON method. The Gin framework delegates this serialization to Go's standard encoding/json package. The standard library JSON marshaler only recognizes the json tag and ignores all custom tags, including protected:"true".

Because Go struct fields must be capitalized to be exported and visible to the standard library's JSON marshaler, all defined settings fields are processed. The marshaler serializes the entire struct, blindly converting the in-memory secrets into plaintext JSON values. The application's custom security annotation is rendered entirely ineffective during the read cycle.

Code Analysis

Prior to version 2.3.8, the GetSettings function in api/settings/settings.go contained a direct passthrough of the configuration structs. The application defined sensitive fields identically to standard configuration options, relying solely on the custom tag for protection.

// Vulnerable Implementation snippet
type AppSettings struct {
    JwtSecret    string `json:"jwt_secret" protected:"true"`
    NodeSecret   string `json:"node_secret" protected:"true"`
    // other fields...
}
 
func GetSettings(c *gin.Context) {
    c.JSON(200, gin.H{
        "app": cSettings.AppSettings,
        // ...
    })
}

The patch introduced in commit 80a6a7273d43dedbd6404662893fe862a2c14bf5 addresses this by enforcing manual redaction before serialization. The developers created a constant redactedSensitiveValue and implemented a buildSettingsResponse function. This function clones the configuration memory space and explicitly overwrites known sensitive keys with the string __NGINX_UI_REDACTED__ before passing the data to c.JSON.

// Patched Implementation snippet
const redactedSensitiveValue = "__NGINX_UI_REDACTED__"
 
func buildSettingsResponse() gin.H {
    app := cloneSettingsSection(cSettings.AppSettings)
    app["jwt_secret"] = redactedSensitiveValue
    app["node_secret"] = redactedSensitiveValue
    // ...
    return gin.H{"app": app}
}

To accommodate legitimate configuration updates without corrupting existing secrets, the developers also introduced a restoreRedactedSensitiveSettings function. This function intercepts incoming save requests. If the frontend submits the exact string __NGINX_UI_REDACTED__ for a protected field, the backend discards the input and retains the original secret from memory.

While this patch mitigates CVE-2026-42223, the chosen architecture relies on a manual denylist. Developers must add new sensitive fields to the redaction function in future updates. A more robust architectural approach would involve separating the internal configuration struct from the API response struct, defining an explicit allowlist of safe fields to serialize.

Exploitation Methodology

Exploitation of CVE-2026-42223 is technically trivial once initial access is obtained. An attacker must first authenticate to the Nginx UI application using valid credentials. This satisfies the low-privilege prerequisite and allows the attacker's HTTP requests to bypass the initial JWT validation middleware protecting the /api routing group.

The attacker then issues an HTTP GET request to the /api/settings endpoint. No specialized headers or payloads are required. The server processes the request and returns the application's entire runtime configuration in JSON format. The attacker parses this response to locate the jwt_secret field within the app configuration block.

GET /api/settings HTTP/1.1
Host: nginx-ui.internal
Authorization: Bearer <low_privilege_token>
 
HTTP/1.1 200 OK
Content-Type: application/json
 
{
  "app": {
    "jwt_secret": "super_secret_hmac_key_123",
    "node_secret": "cluster_node_key_456"
  }
}

Armed with the HMAC signing key, the attacker uses a standard JWT library to forge a new token. The payload is modified to include "role": "admin" or the equivalent highest privilege identifier used by the application. The attacker signs this forged payload using the extracted jwt_secret.

The attacker replaces their original low-privileged bearer token with the newly minted administrative token. Subsequent requests to restricted administrative endpoints are authorized by the backend, granting the attacker full control over the Nginx management interface.

Impact Assessment

The primary impact of CVE-2026-42223 is a complete compromise of the application's authorization boundary. The exposure of the JWT signing secret (JwtSecret) enables vertical privilege escalation. Any low-privileged user can elevate their access to a full administrator role, granting them the ability to modify web server routing, alter reverse proxy targets, and manage TLS certificates.

Beyond authentication bypass, the vulnerability leaks the application's cluster communication keys. The NodeSecret field is utilized to authenticate distinct instances of Nginx UI operating in a clustered environment. An attacker possessing this secret can introduce rogue nodes into the cluster hierarchy or intercept internal configuration sync traffic between legitimate nodes.

Third-party integrations are also exposed through this vulnerability. The configuration object contains the OIDC ClientSecret, which is used for single sign-on flows. Leakage of this secret compromises the OAuth trust relationship between Nginx UI and the identity provider, allowing an attacker to impersonate the application in the broader enterprise environment.

Additionally, the exposure of fields like OpenAIToken highlights the blast radius of the vulnerability. Attackers can extract these third-party API keys and utilize them outside the context of Nginx UI, incurring financial costs or quota exhaustion on the victim's external service accounts.

Remediation and Mitigation

The vendor has addressed CVE-2026-42223 in Nginx UI version 2.3.8. Organizations running any version prior to 2.3.8 must update their deployments immediately. The patched version implements the necessary server-side redaction logic to prevent the exposure of secrets over the API while introducing a secure, 2FA-gated flow for administrators requiring access to these values.

Applying the software update does not resolve the security incident if the vulnerable endpoint was previously exposed to malicious users. Administrators must assume that all secrets contained within the application settings have been compromised. A comprehensive secret rotation process is mandatory following the application of the patch.

The JWT signing secret must be rotated immediately, which will actively invalidate all current user sessions and require users to re-authenticate. The cluster node secrets must be regenerated and redeployed across all nodes to secure inter-node communication. Furthermore, administrators must log into their external service providers to revoke and regenerate OIDC client secrets and any third-party API keys, such as OpenAI tokens.

Organizations should implement detection mechanisms by querying access logs for the affected application. Security teams should look for anomalous HTTP GET requests to the /api/settings path originating from IP addresses associated with low-privileged users. While this will not prevent exploitation, it provides necessary telemetry to identify potential compromise prior to patching.

Official Patches

0xJackyNginx UI v2.3.8 Release Notes

Fix Analysis (1)

Technical Appendix

CVSS Score
6.5/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
EPSS Probability
0.03%
Top 91% most exploited

Affected Systems

Nginx UI backend APINginx UI Cluster Architecture

Affected Versions Detail

Product
Affected Versions
Fixed Version
Nginx UI
0xJacky
< 2.3.82.3.8
AttributeDetail
CWE IDCWE-200
Attack VectorNetwork
CVSS Score6.5
EPSS Score0.00031
ImpactPrivilege Escalation / Information Disclosure
Exploit StatusProof of Concept
CISA KEVNo

MITRE ATT&CK Mapping

T1552.004Unsecured Credentials: API Keys
Credential Access
T1078Valid Accounts
Defense Evasion
CWE-200
Exposure of Sensitive Information

Exposure of Sensitive Information to an Unauthorized Actor

Vulnerability Timeline

Developer implements the redaction logic and 2FA reveal flow
2026-04-18
CVE-2026-42223 is published and GHSA advisory is released
2026-05-04
EPSS and NVD data are updated
2026-05-06

References & Sources

  • [1]GitHub Security Advisory GHSA-q4w7-56hr-83rm
  • [2]NVD Record for CVE-2026-42223

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 18 hours ago•GHSA-H5X8-XP6M-X6Q4
7.1

GHSA-H5X8-XP6M-X6Q4: Unvalidated Signature Generation in @jhb.software/payload-cloudinary-plugin

The @jhb.software/payload-cloudinary-plugin exposes an endpoint that performs unvalidated cryptographic signing of Cloudinary API parameters, allowing authenticated users with minimal privileges to forge valid signatures for arbitrary actions. This flaw allows attackers to overwrite remote storage assets, execute unauthorized file uploads, alter asset visibility parameters, trigger SSRF webhooks, and perform directory traversal within Cloudinary repositories.

Alon Barad
Alon Barad
3 views•6 min read
•about 18 hours ago•GHSA-G2GW-Q38M-VJFC
8.7

GHSA-G2GW-Q38M-VJFC: Server-Side Request Forgery and Bearer Token Exfiltration in @merill/lokka

A Server-Side Request Forgery (SSRF) and Bearer Token Exfiltration vulnerability exists in the @merill/lokka (Lokka) Model Context Protocol (MCP) server prior to version 2.1.2. The server constructed Azure Resource Manager request URLs by concatenating user-controlled path parameters directly into destination request strings. By injecting authority-redefinition characters, an attacker can manipulate URL parsing to execute a host-escape attack, forcing the server to send high-privilege Azure Resource Manager (ARM) Bearer tokens to an external attacker-controlled host. This allows complete administrative access to the associated Azure subscriptions.

Alon Barad
Alon Barad
6 views•7 min read
•about 20 hours ago•GHSA-4XGF-CPJX-PC3J
5.3

GHSA-4xgf-cpjx-pc3j: Directory Traversal and Symlink Following in Pydantic Settings

A directory traversal and symlink following vulnerability exists in Pydantic Settings when using the NestedSecretsSettingsSource with nested subdirectory lookups enabled. An attacker capable of writing to the secrets directory can bypass size limitations, read arbitrary host files, or cause a denial-of-service condition via cyclic symlinks.

Amit Schendel
Amit Schendel
2 views•7 min read
•about 21 hours ago•GHSA-H5RG-8P7F-47G2
4.1

GHSA-h5rg-8p7f-47g2: Server-Side Request Forgery (SSRF) in SurrealDB Identity & Access Management (IAM) JWKS Fetcher

A Server-Side Request Forgery (SSRF) vulnerability exists in SurrealDB's Identity & Access Management (IAM) module prior to version 3.1.5. When configuring JSON Web Key Set (JWKS) URLs for token verification, the remote fetcher follows HTTP redirects by default without validating redirect targets against configured network capabilities. This allows high-privileged users to bypass network access limits and perform blind port scanning of internal network resources.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 22 hours ago•GHSA-CC8F-FCX3-GPJR
7.7

GHSA-cc8f-fcx3-gpjr: Arbitrary File Disclosure via DEFINE ANALYZER mapper filter in SurrealDB

A local file disclosure vulnerability exists in SurrealDB's full-text search capabilities, allowing authenticated users with database EDITOR or OWNER roles to read arbitrary files from the host system filesystem. This occurs by abusing the mapper() filter inside a DEFINE ANALYZER statement to point to system files.

Alon Barad
Alon Barad
6 views•6 min read
•about 23 hours ago•GHSA-H4H3-3RFJ-X6FQ
4.3

GHSA-H4H3-3RFJ-X6FQ: Value-Ordering Oracle Side-Channel via Indexed ORDER BY in SurrealDB

SurrealDB versions 3.0.0 through 3.1.4 contain an information exposure vulnerability (CWE-203) where the query planner optimizes sorted queries using indexes on fields with field-level SELECT restrictions. Because the query planner performs index-based sorting before enforcing permission-based redaction, unauthorized users can observe the physical order of returned rows to deduce the relative values of protected fields.

Alon Barad
Alon Barad
4 views•8 min read