October 3, 2023

Tracked as CVE-2021-38112,could be triggered when the user opens a malicious WorkSpaces URI from the browser, allowing a remote attacker to execute arbitrary code on the vulnerable system.

Managed desktop virtualization service, AWS WorkSpaces provides users with fast access to remote resources. Deployed within an Amazon Private cloud, WorkSpaces can be deployed as a desktop client, on both Windows and Linux machines.

Once after installation the client registers a custom URI that allows users to launch WorkSpaces from their browser, when launched using the URI, the WorkSpaces application did not properly sanitize parameters passed to the command line for authentication to the Amazon service, which could allow for the execution of arbitrary commands.

The WorkSpaces client is based on the Chromium Embedded Framework this allows arguments to be injected into the command line which abuse a known debugging CEF command line argument, allowing arbitrary commands to be executed.

Modern browsers prevent command and argument injection by URL encoding special characters in the URI, but in WorkSpaces the issue resides in the URL decoding, Since parameters in the URI argument are used to launch a new command without sanitization.

The RegCode parameter is validated at startup, thus ensuring it is a valid WorkSpaces registration code, meaning that an attacker could use any valid code for that, and then inject the “–gpu-launcher” argument in the URI, specifying a command that CEF will execute.

This vulnerability could also allow an attacker to potentially pivot into an AWS WorkSpaces host by configuring proxy settings in the WorkSpaces client itself or keylogging usernames and passwords when a victim legitimately accesses their WorkSpaces environment. This issue was addressed in Version 3.1.9 of AWS WorkSpace.

Leave a Reply

%d bloggers like this: