medium

CVE-2026-94566

Packagist · nukeviet/nukeviet

Summary

NukeViet: Login Lockout Bypass via Untrusted Forwarded-IP Headers

Severity
medium
CVSS
5.3
EPSS
0.7% (p56)
CWE
CWE-307
Also known as
GHSA-ccf2-6mf6-j78j
Published
2026-11-30
Updated
2026-11-30

Advisory details

Summary

NukeViet 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.

An 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.

Affected Version

Root Cause

Ips.php 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.

NV_CLIENT_IP is then used as the key for the login blocker in admin_login.php and modules/users/funcs/login.php.

Reproduction

From WSL, place the supplied Bash PoC in the current directory and run:

bash ./nukeviet_xff_lockout_poc.sh \
  http://localhost/admin/

nukeviet_xff_lockout_poc.sh

The script uses a randomly generated nonexistent username. It does not attempt to access a real account.

Verified Result

The following result was reproduced from WSL against NukeViet 4.6.00. With X-Forwarded-For: 203.0.113.203, the installation returned:

attempt=1 blocked=false incorrect=true status=200
attempt=2 blocked=false incorrect=true status=200
attempt=3 blocked=false incorrect=true status=200
attempt=4 blocked=false incorrect=true status=200
attempt=5 blocked=false incorrect=true status=200
attempt=6 blocked=true incorrect=false status=200

Changing only the header to X-Forwarded-For: 203.0.113.204 immediately restored login attempts:

rotated_ip=203.0.113.204 blocked=false incorrect=true status=200
xff

The 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.

Impact

This is a product-level trust issue, not merely a missing proxy configuration option: NukeViet trusts the headers even when the request is received directly.

Remediation

References

Related advisories

Is your project exposed to this? Stateward checks every dependency on every pull request and flags it only if your code actually reaches it.

Check my repo

Summarize with AI

ChatGPTClaudePerplexity

Sources: CISA KEV (public domain), OSV.dev & GitHub Advisory Database (CC-BY-4.0), FIRST EPSS, NVD/CWE (public domain). Served live from the Stateward advisory database.