Summary
FreeRDP clients before 3.29.0 fail to sanitize control characters in the server-provided TargetNetAddress used for RDP redirection over HTTP proxies.
A malicious or compromised RDP server can embed CRLF and control characters to inject arbitrary headers or secondary requests into the HTTP proxy CONNECT traffic, enabling HTTP request smuggling-style attacks when a proxy is in use.
Affected context
This weakness arises in FreeRDP deployments where clients connect to RDP servers through an HTTP proxy and allow server-controlled redirection.
The server-supplied TargetNetAddress field is copied into the client's ServerHostname and then placed directly into the HTTP proxy CONNECT request line and Host header without CRLF or control-character filtering.
Environments using shared or security-critical HTTP proxies, especially in enterprise networks, are most exposed when they trust FreeRDP traffic as well-formed.
Exploit preconditions
- Attack surface: RDP redirection over HTTP proxy in FreeRDP clients
- Required access: Ability to operate, compromise, or impersonate an RDP server that a client connects to
- Trigger point: Server sends a crafted redirection PDU with a
TargetNetAddresscontaining CRLF and embedded header/request fragments - Why exploitation is possible: The client copies this field directly into the HTTP
CONNECTrequest line andHostheader without validating or normalizing control characters, violating HTTP message boundary assumptions and enabling header and request injection into the proxy stream
Why this happens
The core issue is improper neutralization of CRLF and control characters in an HTTP context, aligning with CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers.
FreeRDP treats the server-controlled TargetNetAddress as a benign hostname, directly propagating it into HTTP protocol elements used for the proxy CONNECT request.
By failing to enforce hostname syntax, strip or encode control characters, or constrain this value to a safe subset, the client effectively allows an untrusted peer to shape raw HTTP request lines and headers traversing the proxy.
Potential impact
- Malicious servers may inject arbitrary HTTP headers into the proxy
CONNECTrequest stream. - Attackers could smuggle additional HTTP requests through the proxy, potentially targeting internal services.
- Proxies and downstream systems may be tricked into misrouting or misclassifying traffic.
- Security devices relying on well-formed HTTP requests can be bypassed or confused.
- In some environments, this can contribute to lateral movement or pivoting within internal networks reachable via the proxy.
General mitigation guidance
Effective mitigation focuses on treating any server-controlled address fields as untrusted input and constraining them before use in HTTP protocol elements.
Common defensive patterns include:
- Enforcing strict hostname and port validation on redirection targets, rejecting or normalizing values that fall outside allowed character sets and length constraints.
- Stripping, encoding, or rejecting CR, LF, and other control characters before constructing HTTP request lines or headers.
- Separating logical identifiers (such as display names) from protocol-level fields so that untrusted strings are never written directly into raw HTTP messages.
- Applying a defense-in-depth posture where proxy-facing components assume upstream inputs may be malformed and normalize or validate them prior to forwarding.
How teams detect issues like this
High-level detection approaches may combine code analysis and runtime monitoring:
- Static analysis rules or linters that flag concatenation of untrusted strings into HTTP request lines, headers, or other protocol framing without normalization.
- Code review checklists emphasizing validation of server-supplied redirection targets, hostnames, and headers before they are passed to networking APIs.
- Security-focused tests that intentionally inject CRLF and control characters into fields used in HTTP contexts to observe whether downstream requests remain well-formed.
- Network inspection or proxy logs that detect anomalous or multi-line
CONNECTrequests originating from RDP clients, indicating possible header or request injection patterns.

