{"answers":{"affected":"3 open source packages ship an affected version, including github.com/0xJacky/Nginx-UI. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42221 exists.","fix":"Upgrade github.com/0xJacky/Nginx-UI to 2.3.8 or later.","what":"CVE-2026-42221 is a high-severity authentication bypass vulnerability in 0xJacky nginx-ui, published on 4 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-42221 and fix it if it is affected.\n\nWhat it is: CVE-2026-42221 is a high-severity authentication bypass vulnerability in 0xJacky nginx-ui, published on 4 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42221 exists.\n\nAffected packages and fixed versions:\n- github.com/0xJacky/Nginx-UI (Go): affected all versions; no fix listed\n- github.com/0xJacky/Nginx-UI (Go): affected from 2.0.0; fixed in 2.3.8\n- github.com/0xJacky/Nginx-UI (Go): affected from 2.0.0; fixed in 2.3.8\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-42221/ (Markdown: https://insights.sbomify.com/CVE-2026-42221/index.md)","id":"CVE-2026-42221","markdown":"https://insights.sbomify.com/CVE-2026-42221/index.md","name":"CVE-2026-42221","record":{"aliases":["GHSA-h27v-ph7w-m9fp","GO-2026-5412"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["account_takeover","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"Nginx web UI","requires_auth":"none","summary":"Remote attackers can claim the initial admin account on fresh Nginx UI instances via an unauthenticated install endpoint, leading to full system takeover.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"nginx_ui","vendor":"nginxui"}],"cvss":{"score":8.1,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-306","name":"Missing Authentication for Critical Functionality"}],"description":"Nginx UI is a web user interface for the Nginx web server. From version 2.0.0 to before version 2.3.8, an unauthenticated network attacker can claim the initial administrator account on a fresh nginx-ui instance during the first-run setup window. The public /api/install endpoint is reachable without authentication, and the request-encryption flow only protects payload confidentiality in transit; it does not authenticate who is allowed to perform installation. A remote attacker who reaches the service before the legitimate operator can set the admin email, username, and password, causing permanent initial-instance takeover. This issue has been patched in version 2.3.8.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":"2026-06-23","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":1,"refs":[{"date":"2026-06-23T06:59:10Z","kind":"github_poc","ref":"https://github.com/fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-","stars":0,"title":null},{"date":null,"kind":"nuclei","ref":"http/cves/2026/CVE-2026-42221.yaml","stars":null,"title":"Nginx UI \u003c= 2.3.7 - Unauthenticated Installer Exposure"}],"tier":"weaponised"},"has_fix":true,"headline":"nginx-ui: Unauthenticated First-Run Installer Allows Remote Initial Admin Claim","id":"CVE-2026-42221","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"auth_bypass","year":"2026"},"n_packages":3,"n_references":2,"next":{"headline":"nginx-ui: Unauthenticated first-boot instance claim via POST /api/install allows remote bootstrap takeover","id":"CVE-2026-42222"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/0xJacky/Nginx-UI","purl":"pkg:golang/github.com/0xJacky/Nginx-UI","source":"GO-2026-5412"},{"ecosystem":"Go","fixed":["2.3.8"],"introduced":["2.0.0"],"last_affected":[],"package":"github.com/0xJacky/Nginx-UI","purl":null,"source":"GHSA-h27v-ph7w-m9fp"},{"ecosystem":"Go","fixed":["2.3.8"],"introduced":["2.0.0"],"last_affected":[],"package":"github.com/0xJacky/Nginx-UI","purl":"pkg:golang/github.com/0xJacky/Nginx-UI","source":"GHSA-h27v-ph7w-m9fp"}],"prev":{"headline":"Nginx-UI: Authenticated settings disclosure exposes node.secret and enables trusted-node authentication abuse, backup exfiltration, and restore-based nginx-ui state rollback","id":"CVE-2026-42220"},"products":["nginx-ui"],"published":"2026-05-04","related":[{"cvss_score":9.8,"headline":"Nginx UI: Unauthenticated MCP Endpoint Allows Remote Nginx Takeover","id":"CVE-2026-33032","kev_date_added":null,"published":"2026-03-30"},{"cvss_score":9.8,"headline":"Nginx UI: Unauthenticated Backup Download with Encryption Key Disclosure","id":"CVE-2026-27944","kev_date_added":null,"published":"2026-03-05"},{"cvss_score":9.8,"headline":"Nginx-UI arbitrary file write through the Import Certificate feature","id":"CVE-2024-23827","kev_date_added":null,"published":"2024-01-29"},{"cvss_score":9.4,"headline":"Nginx UI: Authenticated Remote Code Execution via Backup Restore App Config Overwrite","id":"CVE-2026-107806","kev_date_added":null,"published":"2026-10-09"},{"cvss_score":9.4,"headline":"nginx-ui Backup Restore Allows Tampering with Encrypted Backups","id":"CVE-2026-33026","kev_date_added":null,"published":"2026-03-30"},{"cvss_score":9,"headline":"Unauthenticated Remote Code Execution via Backup Restore in nginx-ui","id":"CVE-2026-42238","kev_date_added":null,"published":"2026-05-04"},{"cvss_score":8.9,"headline":"Unchecked logrotate settings lead to arbitrary command execution","id":"CVE-2024-49368","kev_date_added":null,"published":"2024-10-21"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-05-05","vendors":["0xJacky"]},"summary":"Remote attackers can claim the initial admin account on fresh Nginx UI instances via an unauthenticated install endpoint, leading to full system takeover.","url":"https://insights.sbomify.com/CVE-2026-42221/"}