{"id":"CVE-2026-94566","aliases":["GHSA-ccf2-6mf6-j78j"],"url":"https://o3.security/vulnerability/CVE-2026-94566","summary":"NukeViet: Login Lockout Bypass via Untrusted Forwarded-IP Headers","details":"## Summary\n\nNukeViet 4.6.00 unconditionally trusts client-controlled proxy headers, including `X-Forwarded-For`, when determining the client IP. It does not verify that the request came from a trusted reverse proxy.\n\nAn unauthenticated attacker can therefore rotate the header to bypass the built-in login-attempt blocker. The same spoofable IP is also used by admin and API IP restrictions, IP bans, flood protection, and security logging.\n\n## Affected Version\n\n- **Version:** NukeViet 4.6.00\n- **Commit:** `f47de5cd6577d0d49449754be9bafe9081be4981`\n- **Authentication:** Not required\n\n## Root Cause\n\n[`Ips.php`](https://github.com/nukeviet/nukeviet/blob/f47de5cd6577d0d49449754be9bafe9081be4981/vendor/vinades/nukeviet/Core/Ips.php#L128-L190) accepts `HTTP_CLIENT_IP`, `HTTP_X_FORWARDED_FOR`, and similar headers before falling back to the connection's `REMOTE_ADDR`. There is no trusted-proxy check.\n\n`NV_CLIENT_IP` is then used as the key for the login blocker in [`admin_login.php`](https://github.com/nukeviet/nukeviet/blob/f47de5cd6577d0d49449754be9bafe9081be4981/includes/core/admin_login.php#L47-L52) and [`modules/users/funcs/login.php`](https://github.com/nukeviet/nukeviet/blob/f47de5cd6577d0d49449754be9bafe9081be4981/modules/users/funcs/login.php#L816-L823).\n\n## Reproduction\n\nFrom WSL, place the supplied Bash PoC in the current directory and run:\n\n```bash\nbash ./nukeviet_xff_lockout_poc.sh \\\n  http://localhost/admin/\n```\n[nukeviet_xff_lockout_poc.sh](https://github.com/user-attachments/files/30169643/nukeviet_xff_lockout_poc.sh)\n\nThe script uses a randomly generated nonexistent username. It does not attempt to access a real account.\n\n## Verified Result\n\nThe following result was reproduced from WSL against NukeViet 4.6.00. With `X-Forwarded-For: 203.0.113.203`, the installation returned:\n\n```text\nattempt=1 blocked=false incorrect=true status=200\nattempt=2 blocked=false incorrect=true status=200\nattempt=3 blocked=false incorrect=true status=200\nattempt=4 blocked=false incorrect=true status=200\nattempt=5 blocked=false incorrect=true status=200\nattempt=6 blocked=true incorrect=false status=200\n```\n\nChanging only the header to `X-Forwarded-For: 203.0.113.204` immediately restored login attempts:\n\n```text\nrotated_ip=203.0.113.204 blocked=false incorrect=true status=200\n```\n<img width=\"1380\" height=\"904\" alt=\"xff\" src=\"https://github.com/user-attachments/assets/c61592f1-3dce-482f-8660-0804f58e18e5\" />\n\nThe TCP source and target were unchanged. This confirms that an unauthenticated attacker can evade the lockout by supplying a new header value for every attempt.\n\n## Impact\n\n- **Verified impact:** bypass of administrator login lockout, enabling effectively unlimited password-guessing attempts from one source by rotating `X-Forwarded-For`.\n- **Additional code-level exposure:** the spoofable IP is also consumed by user-login controls, IP restrictions, bans, flood controls, and security logging. These additional consequences were not dynamically demonstrated by this PoC.\n\nThis is a product-level trust issue, not merely a missing proxy configuration option: NukeViet trusts the headers even when the request is received directly.\n\n## Remediation\n\n- Use `REMOTE_ADDR` by default.\n- Accept forwarded client-IP headers only when `REMOTE_ADDR` belongs to an explicitly configured trusted proxy.\n- Parse proxy chains from right to left and select the first untrusted address.\n- Ensure rate limits and security logs retain the socket peer address in addition to any validated forwarded address.","published":"2026-11-20T18:38:40.055Z","modified":"2026-11-30T22:00:14.693621783Z","cvss":{"score":5.3,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"},"epss":{"score":0.00741,"percentile":0.5075,"asOf":"2026-11-30"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"nukeviet/nukeviet","fixedVersion":"4.6.01"}],"fix":{"url":"https://github.com/nukeviet/nukeviet/commit/aee1a6d1ab6b0c41f9ae80fb3cc76c5b49562a22","label":"nukeviet/nukeviet@aee1a6d"},"references":[{"type":"WEB","url":"https://github.com/nukeviet/nukeviet/releases/tag/4.6.01"},{"type":"WEB","url":"https://nukeviet.vn/vi/news/Tin-tuc/thong-bao-phat-hanh-nukeviet-4-6-01-857.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/94xxx/CVE-2026-94566.json"},{"type":"ADVISORY","url":"https://github.com/nukeviet/nukeviet/security/advisories/GHSA-ccf2-6mf6-j78j"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-94566"},{"type":"FIX","url":"https://github.com/nukeviet/nukeviet/commit/aee1a6d1ab6b0c41f9ae80fb3cc76c5b49562a22"},{"type":"PACKAGE","url":"https://github.com/nukeviet/nukeviet"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-11-30T22:00:14.693621783Z"}}