Skip to content
Memory corruption Disclosed report Advanced

Malformed playlist.txt in GoldSrc games leads to Access Violation & arbitrary code execution

A crafted playlist.txt file causes a stack overflow in GameUI.dll when the game tries to play the Splash track, leading to a crash and potentially arbitrary code execution. An attacker could send this file from a server using precache_generic, but the client must be restarted for the exploit to trigger.

nyancat0131 Follow

Originally disclosed on HackerOne

Bounty$1,000 High View original
  • Triaged in 11 days
  • Fixed in 50 days
  • Paid in 50 days
  • Disclosed after 6 months

A crafted playlist.txt can be used to exploit a stack overflow vulnerability in GameUI.dll that can lead to arbitrary code execution.

Reproduction

Place attached playlist.txt in game directory (valve, cstrike, etc.). The game will crash when it tries to play Splash track.

Exploitability

The file can be sent from server with precache_generic function (custom mp.dll, amxx plugins, etc.). I don't know ant way to force reload the playlist, so for the exploit to trigger, the client must be restarted. In my opinion, it's still dangerous. And this method won't work if the client already had playlist.txt in the game directory.

Impact

The attacker can use this to do many things, from crashing the client to stealing important data.

The original report as published on HackerOne, by nyancat0131. 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 a stack buffer overflow in GameUI.dll when parsing the playlist.txt file, specifically when handling the Splash track.

Impact

The attacker can crash the client or potentially steal important data, but the exploit requires the client to be restarted and does not work if the client already has a playlist.txt in the game directory.

What the attacker needed

Attacker controls a game server; victim restarts the game client; victim does not already have playlist.txt

How it was found

  1. Place the crafted playlist.txt in the game directory (e.g., valve, cstrike).
  2. Restart the game client.
  3. The game crashes when it tries to play the Splash track.

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.

A stack overflow is when a program writes more data into a small memory area than it can hold, which can crash it or let an attacker run their own code. Here, a file called playlist.txt is read by the game and its contents overflow a buffer in a library called GameUI.dll. An attacker who controls a game server could send this file to players, but the player must restart the game for it to take effect.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by nyancat0131

View all

5 more disclosed reports, best first.

More from Valve

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.