0xJacky nginx-ui
Unauthenticated Remote Code Execution via Backup Restore in nginx-ui
Nginx UI is a web user interface for the Nginx web server. Prior to version 2.3.8, nginx-ui exposes a backup restore endpoint (POST /api/restore) that is completely unauthenticated during the first 10 minutes after process startup on any fresh installation. An unauthenticated remote attacker can upload a crafted backup archive that overwrites the application's configuration file (app.ini) and SQLite database. Because the attacker controls the restored app.ini, they can inject an arbitrary OS command into the TestConfigCmd setting. After the application automatically restarts to apply the restored config, a single follow-up request triggers that command as the user running nginx-ui — typically root in Docker deployments. This issue has been patched in version 2.3.8.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 2.3.8
Fixed in 2.3.8
Mitigation
Upgrade nginx-ui to 2.3.8 or later.
References
- Vendor advisory github.com/0xJacky/nginx-ui/security/advisorie…
- Release notes github.com/0xJacky/nginx-ui/releases/tag/v2.3.…
Timeline
Days relative to CVE publicationFirst public PoC 49 days after publication; not in CISA KEV. First PoC: fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238- (created 23 Jun 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238- | 23 Jun 2026 +49 d | 0 | PoC
Flags · score 15
Below the suspicion threshold (50); does not change the assessment. |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 1 PoC repoGET /api/crypto/public_key
- Ports
- 8080, 8081
- Seen in
- 1 repo: fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-
- Evidence
- fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-/scripts/encrypt_password.py:12
GET /api/install
- Ports
- 8080, 8081
- Seen in
- 1 repo: fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-
- Evidence
- fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-/README.md:84 fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-/scripts/exploit_42221.py:31 fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-/scripts/test_patched.py:8
POST /api/crypto/public_key
- Content-Type
application/json- Ports
- 8080, 8081
- Seen in
- 1 repo: fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-
- Evidence
- fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-/scripts/test_patched.py:14
POST /api/install
- Content-Type
application/json- Ports
- 8080, 8081
- Seen in
- 1 repo: fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-
- Evidence
- fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-/scripts/test_patched.py:37
POST /api/restore
- Content-Type
application/json- Ports
- 8080, 8081
- Seen in
- 1 repo: fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-
- Evidence
- fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-/scripts/test_patched.py:57
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/api/crypto/public_key(?:[?#].*)?$
(?i)^/api/install(?:[?#].*)?$
(?i)^/api/crypto/public_key(?:[?#].*)?$
(?i)^/api/install(?:[?#].*)?$
(?i)^/api/restore(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [8080,8081] (msg:"GG PoC-Monitor CVE-2026-42238 0xJacky nginx-ui exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/api/crypto/public_key"; reference:url,poc.griffinguard.io/cve/CVE-2026-42238; classtype:web-application-attack; sid:9509121; rev:1;)
alert http any any -> $HOME_NET [8080,8081] (msg:"GG PoC-Monitor CVE-2026-42238 0xJacky nginx-ui exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/api/install"; reference:url,poc.griffinguard.io/cve/CVE-2026-42238; classtype:web-application-attack; sid:9195409; rev:1;)
alert http any any -> $HOME_NET [8080,8081] (msg:"GG PoC-Monitor CVE-2026-42238 0xJacky nginx-ui exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/crypto/public_key"; reference:url,poc.griffinguard.io/cve/CVE-2026-42238; classtype:web-application-attack; sid:9308411; rev:1;)
alert http any any -> $HOME_NET [8080,8081] (msg:"GG PoC-Monitor CVE-2026-42238 0xJacky nginx-ui exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/install"; reference:url,poc.griffinguard.io/cve/CVE-2026-42238; classtype:web-application-attack; sid:9499291; rev:1;)
alert http any any -> $HOME_NET [8080,8081] (msg:"GG PoC-Monitor CVE-2026-42238 0xJacky nginx-ui exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/restore"; reference:url,poc.griffinguard.io/cve/CVE-2026-42238; classtype:web-application-attack; sid:9364490; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: 0xJacky nginx-ui exploit attempt (CVE-2026-42238)
id: gg-pocmon-cve-2026-42238-9509121
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-42238. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-42238
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/api/crypto/public_key'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.42238
title: 0xJacky nginx-ui exploit attempt (CVE-2026-42238)
id: gg-pocmon-cve-2026-42238-9195409
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-42238. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-42238
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/api/install'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.42238
title: 0xJacky nginx-ui exploit attempt (CVE-2026-42238)
id: gg-pocmon-cve-2026-42238-9308411
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-42238. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-42238
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/crypto/public_key'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.42238
title: 0xJacky nginx-ui exploit attempt (CVE-2026-42238)
id: gg-pocmon-cve-2026-42238-9499291
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-42238. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-42238
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/install'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.42238
title: 0xJacky nginx-ui exploit attempt (CVE-2026-42238)
id: gg-pocmon-cve-2026-42238-9364490
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-42238. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-42238
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/restore'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.42238