{"id":"CVE-2026-94566","aliases":["CVE-2026-94566","GHSA-ccf2-6mf6-j78j"],"related":[],"kind":"vulnerability","state":"published","title":"NukeViet: Login Lockout Bypass via Untrusted Forwarded-IP Headers","summary":"NukeViet CMS is a multi Content Management System. In 4.6.00, an unauthenticated attacker can rotate X-Forwarded-For because vendor/vinades/nukeviet/Core/Ips.php accepts forwarded client-IP headers without first confirming that REMOTE_ADDR is a trusted proxy. The resulting NV_CLIENT_IP keys the administrator login blocker in includes/core/admin_login.php; changing only the header value bypasses that lockout and permits effectively unlimited password guesses. The same spoofable address is also consumed by the user login blocker in modules/users/funcs/login.php, IP restrictions, bans, flood controls, and security logs, but those additional code-level effects were not dynamically demonstrated. This issue is fixed in version 4.6.01.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"NukeViet CMS is a multi Content Management System. In 4.6.00, an unauthenticated attacker can rotate X-Forwarded-For because vendor/vinades/nukeviet/Core/Ips.php accepts forwarded client-IP headers without first confirming that REMOTE_ADDR is a trusted proxy. The resulting NV_CLIENT_IP keys the administrator login blocker in includes/core/admin_login.php; changing only the header value bypasses that lockout and permits effectively unlimited password guesses. The same spoofable address is also consumed by the user login blocker in modules/users/funcs/login.php, IP restrictions, bans, flood controls, and security logs, but those additional code-level effects were not dynamically demonstrated. This issue is fixed in version 4.6.01.","source":"cvelist"},{"lang":"en","text":"## 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.","format":"markdown","source":"ghsa"}],"published":"2026-11-20T18:38:40.055Z","modified":"2026-11-30T20:45:09.949Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-307"],"affected":[{"ranges":[{"version":">= 4.6.00, < 4.6.01","status":"affected"}],"vendor":"nukeviet","product":"nukeviet","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"4.6.00","status":"affected","fixed":"4.6.01"}],"ecosystem":"Packagist","package":"nukeviet/nukeviet","purl":"pkg:composer/nukeviet/nukeviet","source":"ghsa"}],"references":[{"url":"https://github.com/nukeviet/nukeviet/security/advisories/GHSA-ccf2-6mf6-j78j","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nukeviet/nukeviet/commit/aee1a6d1ab6b0c41f9ae80fb3cc76c5b49562a22","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nukeviet/nukeviet/releases/tag/4.6.01","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nukeviet.vn/vi/news/Tin-tuc/thong-bao-phat-hanh-nukeviet-4-6-01-857.html","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-94566","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nukeviet/nukeviet","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-11-20T19:13:16.933Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-94566","url":"https://www.cve.org/CVERecord?id=CVE-2026-94566","licence":"CVE Terms of Use","modified":"2026-11-30T20:13:33.592Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-ccf2-6mf6-j78j","url":"https://github.com/advisories/GHSA-ccf2-6mf6-j78j","licence":"CC-BY-4.0","modified":"2026-11-30T20:45:09.949Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-94566","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-94566","licence":"Public domain","modified":"2026-11-20T20:17:50.980Z"}],"updatedAt":"2026-11-30T20:57:25.078Z","epss":{"score":0.00741,"percentile":0.55844,"date":"2026-12-01T12:00:22.000Z"}}