Summary
NukeViet CMS can make a server-side cURL request based on attacker-controlled forwarded host and protocol values before authentication. An unauthenticated attacker may use this behavior to probe internal hosts and ports or poison cached server headers.
Affected context
The issue affects NukeViet CMS versions before 4.5.09 when the server information update path is reachable without authentication. In this path, standardizeHost() does not validate the forwarded host against my_domains, and a trailing slash can leave an attacker-selected port in the value used to construct a cURL request. The request is blind, uses the HEAD method, and targets a fixed path.
Exploit preconditions
- Attack surface: The server information update functionality in NukeViet CMS
- Required access: No authentication is required; the attacker must be able to send requests to the exposed application
- Trigger point: An unauthenticated request containing
__serverInfoUpdate=1 - Attacker-controlled inputs: The
X-Forwarded-HostandX-Forwarded-Protoheaders - Why exploitation is possible: Forwarded host values are not checked against
my_domains, and host normalization can preserve an attacker-selected port used in a server-side cURL request
Why this happens
The application uses forwarded host and protocol data to construct a server-side request without adequately validating the destination. Because standardizeHost() does not enforce the configured my_domains allowlist in this path, attacker-controlled input can influence the request destination. This is a server-side request forgery weakness, mapped to CWE-918.
Potential impact
- An attacker may infer whether internal hosts or ports are reachable from the application server
- The behavior could expose information about internal network services through observable request outcomes
- Cached
server_headersmay be poisoned - The request behavior could increase the risk of further attacks against reachable internal services
General mitigation guidance
Defensive patterns focus on preventing user-controlled request metadata from determining server-side destinations.
- Derive request destinations from trusted configuration rather than forwarded headers
- Validate hostnames against an explicit allowlist at the point where requests are constructed
- Parse and normalize host and port values consistently, rejecting ambiguous or malformed forms
- Treat proxy-provided headers as untrusted unless they come from explicitly trusted proxies
- Restrict outbound network access and run application processes with least privilege
- Avoid caching response metadata that can be influenced by untrusted request data
How teams detect issues like this
- Use static analysis to identify outbound HTTP clients whose destinations depend on request headers or other untrusted input
- Review host normalization and allowlist checks, including handling of ports and trailing slashes
- Monitor for unauthenticated requests that set
__serverInfoUpdate=1alongside unusual forwarded host or protocol values - Apply egress policies that limit application access to internal networks and unexpected destinations
- Add tests and policy checks to ensure server-side requests use approved destinations only

