Apr 3, 2026·6 min read·6 visits
A circular trust vulnerability in Nginx UI's backup system allows authenticated attackers to tamper with configuration backups. Restoring a forged backup leads to arbitrary command execution on the host system. Upgrade to v2.3.4 immediately.
Nginx UI prior to version 2.3.4 contains a critical cryptographic design flaw in its backup and restore mechanism. The application relies on a circular trust model where backup integrity is protected by user-controlled encryption keys, allowing an attacker to forge backup archives and achieve Remote Code Execution upon restoration.
Nginx UI is a web-based administration interface designed to manage Nginx web server configurations. Prior to version 2.3.4, the application's configuration backup and restoration mechanism contained a critical cryptographic design flaw categorized under CWE-347. The vulnerability emerges from a circular trust dependency where the integrity metadata of the backup is protected by the same encryption key provided to the end user.
The application utilizes AES-256-CBC to encrypt backup archives, specifically generating files such as nginx-ui.zip and nginx.zip. While this cipher block chaining mode provides data confidentiality, it fundamentally lacks authenticated encryption capabilities. The system generates an AES key and Initialization Vector (IV) during the backup process, delivering this keying material directly to the user as a backup security token.
Because the user controls the decryption key, they possess the cryptographic material required to manipulate the archive contents. The resulting vulnerability permits an attacker to forge a completely valid backup manifest. Restoring this manipulated archive results in the application parsing malicious configurations, directly leading to unauthenticated Remote Code Execution (RCE) on the host operating system.
The vulnerability originates within the Go backend implementation, specifically residing in the internal/backup package. The core logical error is the system's reliance on user-accessible keying material to validate server-side state integrity. The integrity of the backup is verified against a manifest file, historically named hash_info.txt, which contains SHA-256 hashes of the archive's internal components.
This manifest file is encrypted using the identical AES key and IV distributed to the user. This architecture effectively transforms the attacker into an encryption oracle. The user possesses the capability to decrypt the backup bundle, modify sensitive application files, and recalculate the SHA-256 hashes for the tampered data blobs.
The attacker then updates the manifest with the forged hashes and re-encrypts the entire bundle using the original keying material. Furthermore, earlier versions of the restore.go module failed to implement strict fail-closed logic. The application logged warnings for hash validation failures but systematically allowed the restoration process to finalize, rendering the initial security control entirely ineffective.
The transition from the vulnerable state to the patched version requires examining the specific cryptographic enforcement mechanisms. In versions prior to 2.3.4, the backend accepted the hash_info.txt file as the definitive source of truth without verifying its origin. The application lacked a server-side secret to authenticate the data, relying purely on the symmetric key shared with the client.
The v2.3.4 patch fundamentally restructures this mechanism by introducing signed manifests. The application now generates a manifest.json file accompanied by a distinct manifest.sig cryptographic signature. This signature is computed using an HMAC-SHA256 algorithm bound to a server-side secret defined in settings.CryptoSettings.Secret.
This modification ensures the server retains an exclusive, private key required to generate a valid integrity signature. The updated restoration logic strictly enforces signature validation, immediately rejecting any backup bundle that fails the HMAC verification. Additionally, the developers introduced centralized path validation via ResolveConfPath to proactively mitigate directory traversal attacks during the archive extraction phase.
Exploiting CVE-2026-33026 requires an attacker to possess a valid backup ZIP archive and its corresponding AES key and IV token. This prerequisite is typically satisfied by an attacker with administrative access to the Nginx UI management interface. Alternatively, a network adversary who successfully intercepts the backup token transmission can fulfill this requirement.
The exploitation sequence begins with the offline decryption of the target archive using the intercepted cryptographic token. The attacker extracts the archive contents and targets the app/app.ini configuration file for modification. The primary injection vector involves manipulating the StartCmd directive located under the [terminal] or [logrotate] configuration sections.
An attacker inserts a malicious command, such as a reverse shell payload, into the StartCmd variable. Following the modification, the attacker computes new SHA-256 hashes for the altered files, reconstructs the archive, and encrypts the payload utilizing the original token. Upon uploading the forged archive to the system restoration endpoint, the application extracts the malicious configuration and executes the injected payload during the next scheduled task or terminal initialization.
The successful exploitation of this cryptographic flaw results in arbitrary code execution with the privileges of the Nginx UI backend process. The injected commands embedded within the StartCmd directive execute synchronously when the application interacts with the affected configuration scopes. This behavior grants an attacker persistent, system-level access to the underlying server infrastructure.
The vulnerability is scored at 9.1 (Critical) under the CVSS v3.1 framework and 9.4 under CVSS v4.0. The scoring reflects the remote nature of the attack, the lack of required user interaction beyond the initial administrative access, and the high impact on systemic confidentiality, integrity, and availability. The attack vector specifically leverages credential access techniques documented under MITRE ATT&CK T1552.
Public proof-of-concept exploits exist for this vulnerability, confirming the theoretical attack chain documented by security researchers. The EPSS score of 0.00021 indicates a documented risk of active exploitation, although the vulnerability is not currently tracked in the CISA Known Exploited Vulnerabilities (KEV) catalog. The presence of functional exploit code reduces the barrier to entry for threat actors targeting administrative web interfaces.
The sole comprehensive remediation for CVE-2026-33026 is upgrading the Nginx UI installation to version 2.3.4 or later. This release contains the mandatory cryptographic refactoring required to sever the circular trust dependency. Organizations must ensure the patched version is deployed across all exposed administration interfaces.
If immediate patching is technically infeasible, organizations must rigorously restrict network access to the Nginx UI administrative console. Implementing robust access control lists (ACLs) and mandating multi-factor authentication for the management interface minimizes the risk of unauthorized token acquisition. The vulnerability cannot be mitigated through configuration changes alone due to the inherent flaw in the backup generation routine.
Security operations teams should monitor endpoint execution logs for anomalous process creations originating from the Nginx UI binary. Detection engineering efforts should focus on identifying unexpected shell executions, specifically reverse shell invocations initiated by the Nginx UI parent process. Auditing successful backup restoration events correlated with subsequent execution anomalies provides a reliable behavioral detection metric.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
Nginx UI Nginx UI | < 2.3.4 | 2.3.4 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-347 |
| Attack Vector | Network |
| CVSS Score | 9.1 (Critical) |
| EPSS Score | 0.00021 (5.51%) |
| Impact | Remote Code Execution (RCE) |
| Exploit Status | Proof-of-Concept |
| KEV Status | Not Listed |
The system does not properly verify cryptographic signatures or integrity checks, allowing attackers to forge or tamper with signed data.