Unauthenticated input injection into FreeRDP shadow sessions
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · GHSA-j5pq-cm28-qm6v. Fix status from GitHub. Impact type from CWE-306.
Summary
FreeRDP from 3.0.0 before 3.33.0 processes Fast-Path input PDUs before a client has completed authentication, which is a missing authentication for critical functionality flaw (CWE-306). An unauthenticated network client that negotiates TLS-only RDP can skip the capabilities exchange and inject keyboard and mouse events into the shadowed X11 session before any credential is checked.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Description from the GitHub advisory
### Summary FreeRDP's shadow server only authenticates a remote-desktop client after it completes capabilities exchange and activation, but the Fast-Path input dispatcher (fastpath_recv_input_event_* in libfreerdp/core/fastpath.c) forwards mouse, keyboard, and synchronize events straight to the X11 backend without ever checking that state has been reached. An unauthenticated network client that negotiates TLS-only RDP and simply never sends Confirm Active can inject real keypresses and mouse movement into the host user's X11 session via XTEST before any credential is checked. ### Details ### Component libfreerdp/core/fastpath.c (fastpath_recv_input_event_scancode/_mouse/_relmouse/_mousex/ _sync/_unicode/_qoe), dispatched from libfreerdp/core/peer.c's generic peer_recv_pdu(), delivered to server/shadow/shadow_input.c and the X11 subsystem backend (server/shadow/X11/x11_shadow.c), which calls XTestFakeKeyEvent/XTestFakeMotionEvent. ### Threat model Attacker: any network client able to reach a freerdp-shadow-cli listener (binds 0.0.0.0 by default; a 100%-default server accepts a client's own choice of TLS-only RDP security negotiation alongside NLA - this is not an admin opt-in). Victim: the host user whose X11 session is being shadowed, under the default mayInteract=TRUE. Trust boundary crossed: FreeRDP's own "input requires the session to have reached CONNECTION_STATE_ACTIVE (i.e., post-authentication)" rule, which it enforces for every slow-path input PDU type but not for the structurally equivalent fast-path PDU type. ### Root cause peer_recv_pdu() decides slow-path vs. fast-path purely by the first byte of the incoming TPKT/COTP header (tpkt_verify_header()), independent of rdp->state. It is called from essentially every pre-CONNECTION_STATE_ACTIVE waiting point in the server state machine, including CONNECTION_STATE_CAPABILITIES_EXCHANGE_CONFIRM_ACTIVE, whose own code comment says the branch exists only for a reactivation special case. The six slow-path handlers in libfreerdp/core/input.c (input_recv_sync_event/ _keyboard_event/_unicode_keyboard_event/_mouse_event/_relmouse_event/ _extended_mouse_event) were given a rdp_has_reached_state(rdp, CONNECTION_STATE_ACTIVE) guard by commit a7e799d17 ("[core,input] only pass input events when connected"), released in FreeRDP 3.32.0. The seven structurally equivalent fast-path handlers in libfreerdp/core/fastpath.c call IFCALLRESULT(..., input->KeyboardEvent/MouseEvent/..., ...) directly, with no equivalent guard. Confirmed via git diff that this file is byte-identical between the 3.31.1 tag, the 3.32.0 tag, and the current master tip (b2403bb99) - no commit since has added a state check here. server/shadow/shadow_input.c's handlers only check client->mayInteract (default TRUE, set unconditionally at server startup in server/shadow/shadow_server.c) - the authentication boundary was always meant to live in input.c/fastpath.c, not here. ### Relation to existing advisories GHSA-m998-cvfm-9444 (CVE-2026-110838) is the direct parent of this gap and describes the identical primitive via the slow-path DATA_PDU_TYPE_INPUT route. Its own "Suggested remediation" section states: "Cover slow-path and fast-path keyboard, mouse, extended mouse, Unicode keyboard, and synchronize input." The fix shipped in 3.32.0 (a7e799d17) covers only the six slow-path handlers in input.c; fastpath.c was not touched. This is not a new interpretation of the vendor's intent - the original disclosure already named fast-path as in scope, and it was not implemented. ### Suggested fix Add the same rdp_has_reached_state(rdp, CONNECTION_STATE_ACTIVE) check used in the sibling slow-path handlers to the top of each of the seven fastpath_recv_input_event_* handlers in libfreerdp/core/fastpath.c, returning early (without invoking the rdpInput callback) when the state has not been reached. ### AI Use Disclosure AI assistance (Claude) was used to analyze FreeRDP's source code, build the reproduction harness, and draft this report. All protocol-level reproduction steps described above were executed against the real, unmodified FreeRDP shadow server and independently verified by the reporter before submission. ### Proof of concept Versions tested: FreeRDP 3.32.0 (tag, commit d27a4f7c1) - built from source and run live. Current master (commit b2403bb99, 2026-10-23) - confirmed via git diff/sha256 that fastpath.c, peer.c, and input.c are byte-identical to the 3.32.0 tag for the relevant code paths; not independently rebuilt, confirmed statically. Built freerdp-shadow-cli from the official 3.32.0 tag (CMake, WITH_SHADOW=ON WITH_X11=ON, vendor source unmodified), run against a real Xvfb display with XTEST support, at fully default settings: freerdp-shadow-cli /port:23389 (NLA, TLS, RDP negotiation, and -auth all left at their compiled-in defaults - no flag disables anything). Wrote a minimal MS-RDPBCGR client in Python that: 1. Negotiates TLS-only RDP security (RDP Negotiation Request, requestedProtocols = PROTOCOL_SSL only). 2. Completes MCS Connect Initial/Response, Erect Domain Request, Attach User Request/Confirm, Channel Join Request/Confirm. 3. Sends a real Client Info PDU (with a correctly-formed Extended Info Packet). 4. Receives and discards the server's License Error Alert PDU and Demand Active PDU. 5. Deliberately never sends Confirm Active and never supplies a valid credential - PostConnect (the shadow server's auth callback) never runs; CONNECTION_STATE_ACTIVE is never reached. 6. Sends one Fast-Path Input Event PDU carrying a PTRFLAGS_MOVE mouse event, e.g. for target (999,111): 04800a200008e7036f00. Observed result: the X11 display's actual pointer position (queried over an independent connection via python-xlib's XQueryPointer) moved to exactly the injected coordinates, immediately, with no warning or error in the shadow server's own debug log. Controls (identical setup - same omitted Confirm Active, same missing credential - differing only in using the already-patched DATA_PDU_TYPE_INPUT slow-path route instead of fast-path): sent the equivalent PTRFLAGS_MOVE event as a slow-path Share-Control/Share-Data PDUTYPE2_INPUT Data PDU on the same MCS channel. The X11 pointer did not move. The server's debug log recorded: [WARN][com.freerdp.core.rdp] - [input_recv_mouse_event]: State CONNECTION_STATE_ACTIVE (or higher) requested, but CONNECTION_STATE_CAPABILITIES_EXCHANGE_CONFIRM_ACTIVE found. Aborting. - the 3.32.0 fix's own gate firing exactly as intended for the route it covers. Both the fast-path injection and the slow-path control were repeated against a freshly started, fully stock-default server process and reproduced identically with different target coordinates each time (isolating cause from coincidence): fast-path (700,700) moved; (321,654) moved; (999,111) moved under stock defaults. Slow-path control under stock defaults, target (222,333): pointer unchanged, gate warning logged. Stack / environment reach: measured directly - the real freerdp-shadow-cli binary built from the official 3.32.0 source tag, speaking the real MS-RDPBCGR/T.125/X.224 protocol stack over a real TCP socket and a real TLS 1.3 session, driving a real Xvfb X server with the real XTEST extension, independently verified via a second X11 client. Not measured: a real desktop session with a window manager (XTEST operates identically against any X server, so this does not change the result); a non-loopback network path (does not change the protocol-level reasoning). Verification level: reproduced end-to-end in a real, unmodified build of the vendor's own shipped binary - not an isolated function call, not a reconstructed PoC against stubs - with a control group that isolates the cause to "which dispatcher received the PDU," confirmed under both a deliberately-forced TLS-only server configuration and a fully stock-default configuration. A self-contained reproduction is attached (poc.zip) - see its README.md inside. It builds the real freerdp-shadow-cli from the official 3.32.0 tag inside a Docker image (no environment dependency beyond Docker on the host), then runs the control and the attack against it, checking the real X11 pointer position before/after each via XTEST. ### Impact Missing Authentication for Critical Function (CWE-306): an unauthenticated network client can inject synthetic keyboard and mouse input into the host user's interactive X11 session before completing RDP activation and before any credential is checked, via a second (unpatched) input-PDU dispatcher that is functionally identical to the one already fixed for CVE-2026-110838. Impacted: any FreeRDP shadow server (freerdp-shadow-cli / libfreerdp-shadow) reachable over the network, under the default mayInteract=TRUE and default TLS-only-negotiation acceptance - confirmed not to require any non-default configuration. No screen/content disclosure is demonstrated (C:N - no graphics output was requested or received) and no crash/DoS is demonstrated (A:N). CVSS v3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N = 7.5, High. Happy to follow FreeRDP's standard disclosure process.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | FreeRDP (c) | >= 3.0.0 | 3.33.0 | Patch available | GHSA-j5pq-cm28-qm6v |
- FreeRDP (c) Vendor— Affected >= 3.0.0 Fixed in 3.33.0 Patch available GHSA-j5pq-cm28-qm6v
Remediation
Upgrade FreeRDP to version 3.33.0 or later.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
- Fix · GHSA-j5pq-cm28-qm6v FreeRDP (c) Fixed in 3.33.0 Advisory →
Timeline
- 2026-11-12 Threatist record created from GHSA-j5pq-cm28-qm6v
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences