Summary
NukeViet CMS 4.6.00 has a server-side request forgery (SSRF) flaw caused by inconsistent handling of the forwarded and ordinary Host headers. An unauthenticated attacker may be able to influence an outbound request so it reaches an attacker-selected internal host, port, or path, potentially exposing internal HTTP endpoints.
Affected context
The issue occurs in NukeViet CMS 4.6.00 when request handling validates the forwarded host but retains the ordinary Host value for a later outbound cURL request. The risk arises when that request follows redirects, allowing it to reach a destination that would not have been permitted by the earlier validation.
Exploit preconditions
- Attack surface: An HTTP request to a NukeViet CMS instance using the affected request-handling flow
- Required access: No authentication is required
- Trigger point: Processing that invokes
set_ini_file()and constructs an outbound cURL request - Why exploitation is possible: The forwarded host is validated separately from the ordinary Host value used for the outbound request, and redirect following can carry the request to an attacker-selected internal destination
Why this happens
The application validates one host value but later uses a separately retained host value when constructing an outbound request. Following redirects can further expand the request's destination beyond the initially validated host. This maps to CWE-918: Server-Side Request Forgery, where an application makes requests to destinations influenced by untrusted input without consistently restricting the final destination.
Potential impact
- The server may be induced to make requests to private hosts, ports, or paths.
- Internal HTTP endpoints may be reached from the application's network position.
- Responses or side effects from internal services could be exposed or triggered, depending on their behavior and the application's handling of results.
- The issue could provide a foothold for further investigation of reachable internal services.
General mitigation guidance
Defensive patterns include:
- Apply consistent validation to every host value used in outbound requests.
- Prefer fixed, allowlisted destinations over destinations derived from request headers.
- Restrict redirects, or revalidate each redirect target against destination policy.
- Use network egress controls to limit access to private and otherwise sensitive address ranges.
- Minimize the privileges and network reach of the application process.
- Avoid treating forwarded headers as trustworthy unless they are set by a trusted proxy and validated at the appropriate boundary.
How teams detect issues like this
Review code paths that derive outbound request destinations from Host or forwarded headers, especially where validation and use occur in different components. Static analysis and code review can look for cURL or HTTP client calls whose destinations depend on request-controlled values, as well as redirect-following behavior that does not revalidate targets. Policy checks can require destination allowlists and controlled network egress; automated review tools may help identify these patterns.

