Skip to content
RCE Disclosed report Advanced

Steam Deck Single Click Root Remote Code Execution

The Steam client's embedded Chromium (CEF) was an outdated version vulnerable to a known V8 exploit, so a malicious page loaded in a Steam Chat link could achieve code execution in the steamwebhelper process. Because that process ran as the user with the sandbox disabled and the user had passwordless sudo, the attacker could chain this to full root access after a single click.

g1a55er Follow

Originally disclosed on HackerOne

Bounty$750incl. $750 bonus High 8.6 View original
  • Paid in 7 days
  • Disclosed after 3 months

Summary by the program

The version of Chromium Embedded Framework included in the Linux client was susceptible to a v8 exploit that allowed modification of local files. The researcher demonstrated chaining local file modification to a local privilege escalation.

Summary by the researcher

The Steam Deck on latest software is vulnerable to a Remote Code Execution (RCE) vulnerability which can be chained with a privilege escalation vulnerability to provide an attacker full arbitrary root execution access after a user clicks on a link to maliciously crafted webpage in a Steam Chat message. The entire exploit chain can run deterministically after that single click with no further user interaction.

Specifically, the Chromium Embedded Framework (CEF) used in the steamwebhelper is based on Chromium version 85.0.4183.121. This version is vulnerable to CVE-2020-16040. If the steamwebhelper loads a malicious page, this CVE can be exploited to obtain an RCE in the steamwebhelper process.

The steamwebhelper process runs as the user “deck” with the CEF sandbox disabled. This means that immediately after exploitation, the attacker has access to all of the user’s files, because all user content is readable by “deck”. Likely most critically, this includes the Steam Sentry credential file stored at ~/.local/share/Steam/ssfn* that will be present on all Steam Decks and facilitates Steam account takeovers.

From here, we can pivot to obtaining full root access. By default, the deck user has sudoers privileges and no password set. Thus, all we need to do is set a password and then provide that password to the “sudo” binary for a full root shell.

However, the steamwebhelper executes with the “no new privileges” flag set, which prevents us from directly calling sudo from the initial RCE context. This can be easily circumvented by modifying some executable file that the deck user has access to that another process will eventually execute outside of the steamwebhelper process. Given the substantial file access privileges of the deck user (e.g. access to all games, the entire Steam executable, other apps, etc.), there are a variety of options to choose from for this. I verified that at least one such vulnerable site exists to facilitate this privilege escalation by planting a malicious payload in ~/.bashrc, which seems to be executed at least whenever the device reboots. All these steps could be achieved in the shellcode executed from the Chrome RCE.

Once you have achieved persistent root access, you can access all files and peripherals on the device.

The original report as published on HackerOne, by g1a55er. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the bundled Chromium Embedded Framework was an outdated version (85.0.4183.121) vulnerable to CVE-2020-16040, and steamwebhelper ran with the CEF sandbox disabled as a user with passwordless sudo.

Impact

An attacker could gain full arbitrary root execution on the device and access all files and peripherals, and could also take over the victim's Steam account, after a single click with no further interaction.

What the attacker needed

Victim clicks a link in Steam Chat; Steam Deck on latest software; no further user interaction needed

How it was found

  1. Send a Steam Chat message containing a link to a maliciously crafted webpage.
  2. The victim clicks the link, causing steamwebhelper to load the page.
  3. Exploit CVE-2020-16040 in the outdated CEF to get code execution in steamwebhelper.
  4. Read the user's files, including the Steam Sentry credential file.
  5. Modify an executable file another process runs, such as ~/.bashrc, to gain root.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Steam Deck's chat window uses an old built-in web browser to show web pages. That browser had a known flaw that let a malicious web page run code on the device, and because the browser ran without its usual protective sandbox, the attacker could then take over the whole machine. The user only had to click a link.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More from Valve

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.