Use-after-free in FreeRDP RDPEWA client during WebAuthn abort
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.0 · GHSA-52rf-pppx-qm55. Fix status from GitHub. Impact type from CWE-416 and the CVSS impact.
Summary
FreeRDP versions from 3.25.0 through 3.33.0 are affected. The RDPEWA client frees FIDO operation state while a worker thread can still use it after the RDP connection aborts a pending WebAuthn request, a use-after-free (CWE-416). A malicious RDP server can trigger this by starting a WebAuthn request and then disconnecting, with high availability impact.
Written with Claude Haiku 5.5 from the sources below · 2026-11-17
Description from the GitHub advisory
### Summary The RDPEWA client starts an untracked FIDO2 worker with a pointer to a stack-local RDPEWA_FIDO_ASYNC object. If the RDP connection aborts while MakeCredential or GetAssertion is pending, notifyWait closes the worker handle and calls fido_dev_cancel without joining. Cleanup then frees the FIDO operation state while the worker can still use it and write fta.result into the returned stack frame. A malicious RDP server can trigger this path by starting a WebAuthn request and disconnecting. ASan reproduced heap-use-after-free and stack-use-after-return in the repository implementation. ### Details Tested commit: f0f03eb0290d0ff600696763edf44ea2e37a455b5 (3.32.2-669-gf0f03eb02). Affected component: channels/rdpewa/client. The server-controlled WebAuthn command is dispatched at https://github.com/FreeRDP/FreeRDP/blob/f0f03eb0290d0ff600696763edf44ea2e37a455b5/channels/rdpewa/client/rdpewa_main.c#L124-L160. The MakeCredential and GetAssertion workers receive the address of a stack-local RDPEWA_FIDO_ASYNC object and write result after the FIDO call returns: https://github.com/FreeRDP/FreeRDP/blob/f0f03eb0290d0ff600696763edf44ea2e37a455b5/channels/rdpewa/client/rdpewa_fido.c#L88-L100. On abort, notifyWait waits for either the worker or freerdp_abort_event, closes the worker handle, calls fido_dev_cancel, and returns without joining the worker: https://github.com/FreeRDP/FreeRDP/blob/f0f03eb0290d0ff600696763edf44ea2e37a455b5/channels/rdpewa/client/rdpewa_fido.c#L119-L135. The failure paths then free the MakeCredential object and device at https://github.com/FreeRDP/FreeRDP/blob/f0f03eb0290d0ff600696763edf44ea2e37a455b5/channels/rdpewa/client/rdpewa_fido.c#L746-L756 and the GetAssertion object and device at https://github.com/FreeRDP/FreeRDP/blob/f0f03eb0290d0ff600696763edf44ea2e37a455b5/channels/rdpewa/client/rdpewa_fido.c#L1109-L1119. The outer RDPEWA worker is tracked by the channel, but the inner FIDO thread is not: https://github.com/FreeRDP/FreeRDP/blob/f0f03eb0290d0ff600696763edf44ea2e37a455b5/channels/rdpewa/client/rdpewa_main.c#L228-L241. libfido2 cancellation is not a thread join. Its fido_dev_cancel implementation sends a CTAP cancel request, and libfido2 maintainers state that concurrent access to a device must be serialized: https://github.com/Yubico/libfido2/blob/main/src/dev.c and https://github.com/Yubico/libfido2/discussions/637. ### Proof of concept Environment: Apple Silicon ARM64 macOS, AppleClang 21, AddressSanitizer. Production trigger sequence: 1. Build FreeRDP with CHANNEL_RDPEWA_CLIENT=ON and libfido2 support. 2. Connect the client to a server controlled by the tester. 3. Send an RDPEWA WebAuthn MakeCredential or GetAssertion request with valid CBOR. 4. Keep the local FIDO operation pending. 5. Close the RDP connection from the server. 6. notifyWait returns without joining the FIDO worker; cleanup frees the operation state while the worker remains runnable. The following minimal reproducer isolates the same worker/stack-object lifetime sequence: #include <pthread.h> #include <stdlib.h> typedef struct { void* dev; void* cred; int result; } RDPEWA_FIDO_ASYNC; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t condition = PTHREAD_COND_INITIALIZER; static pthread_t thread; static int entered; static int release; static void fido_dev_cancel(void* dev) { (void)dev; } static void* rdpewa_fido_makecred_thread(void* arg) { RDPEWA_FIDO_ASYNC* async = arg; pthread_mutex_lock(&mutex); entered = 1; pthread_cond_signal(&condition); while (!release) pthread_cond_wait(&condition, &mutex); pthread_mutex_unlock(&mutex); async->result = 0; return NULL; } static void vulnerable(void) { RDPEWA_FIDO_ASYNC async = { malloc(1), malloc(1), 0 }; pthread_create(&thread, NULL, rdpewa_fido_makecred_thread, &async); pthread_mutex_lock(&mutex); while (!entered) pthread_cond_wait(&condition, &mutex); pthread_mutex_unlock(&mutex); fido_dev_cancel(async.dev); free(async.cred); free(async.dev); } int main(void) { vulnerable(); pthread_mutex_lock(&mutex); release = 1; pthread_cond_signal(&condition); pthread_mutex_unlock(&mutex); pthread_join(thread, NULL); return 0; } Build and run: cc -O0 -g -fno-omit-frame-pointer -fsanitize=address poc.c -pthread -o poc ASAN_OPTIONS=verbosity=0:detect_stack_use_after_return=1:halt_on_error=1 ./poc Expected result: AddressSanitizer: stack-use-after-return at async->result in rdpewa_fido_makecred_thread. Separately, the repository implementation was compiled into an ASan/UBSan harness. Holding the FIDO call until after the vulnerable function returned produced stack-use-after-return at rdpewa_fido.c:91 and heap-use-after-free in the FIDO worker. ### Impact Attacker: a malicious or compromised RDP server. Prerequisites: the FreeRDP client must have RDPEWA/libfido2 enabled, a FIDO authenticator available, and connect to the server. The confirmed defect is CWE-416/CWE-362 memory corruption in the client worker lifetime. The repository harness reproduced both heap-use-after-free and stack-use-after-return, resulting in client crash under ASan. Proposed CVSS v3: 7.0 High (AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H). This is distinct from public FreeRDP issue #12937, whose fix addresses SDL notification-thread affinity rather than the RDPEWA worker lifetime path.
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.25.0, <= 3.33.0 | 3.33.1 | Patch available | GHSA-52rf-pppx-qm55 |
- FreeRDP (c) Vendor— Affected >= 3.25.0, <= 3.33.0 Fixed in 3.33.1 Patch available GHSA-52rf-pppx-qm55
Remediation
Upgrade FreeRDP to version 3.33.1 or later.
Written with Claude Haiku 5.5 from the sources below · 2026-11-17
- Fix · GHSA-52rf-pppx-qm55 FreeRDP (c) Fixed in 3.33.1 Advisory →
Timeline
- 2026-11-17 Threatist record created from GHSA-52rf-pppx-qm55
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences