CVE-2017-20205
BaseFortify
Publication date: 2025-10-15
Last updated on: 2025-10-16
Assigner: VulnCheck
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| valve | source_sdk | 2013 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-121 | A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2017-20205 is a critical stack-based buffer overflow vulnerability in Valve's Source SDK (source-sdk-2013), specifically in the ragdoll model parsing logic. The vulnerability occurs because the tokenizer function `nexttoken` copies characters from an input string into a fixed-size stack buffer without checking if the input exceeds the buffer size. When the `ParseKeyValue` function processes a `collisionpair` rule longer than 256 bytes, it causes a stack buffer overflow that can overwrite the function's return address. This allows a remote attacker to execute arbitrary code by supplying a specially crafted ragdoll model with an oversized `collisionpair` rule, affecting both clients and servers using the Source SDK. [1, 2]
How can this vulnerability impact me? :
This vulnerability can lead to remote code execution on affected clients or servers running Valve's Source SDK or games based on it. An attacker can exploit the buffer overflow by supplying a specially crafted ragdoll model that triggers the overflow, allowing them to overwrite the return address and execute arbitrary code. This can result in full compromise of the affected system, including running malicious programs such as command shells. The exploit can be triggered remotely without requiring user interaction or privileges, making it highly dangerous. Additionally, the lack of ASLR in some components made exploitation easier. The impact includes potential unauthorized control, data compromise, and disruption of service. [1, 2]
How can this vulnerability be detected on my network or system? Can you suggest some commands?
Detection of this vulnerability involves identifying if the system or game client/server is loading specially crafted ragdoll model files with oversized collisionpair rules that trigger the stack buffer overflow. Since the exploit involves loading malicious ragdoll models packed into map files with the same resource path as original models, monitoring for unusual or unauthorized ragdoll model files or map files is key. Additionally, checking if the vulnerable version of Source SDK or affected games are running is important. Specific commands are not provided in the resources, but recommended detection steps include verifying if the executable steamclient.dll has ASLR enabled (using tools like Chromium's checkbins.py), and monitoring network traffic or file system for suspicious downloads or file modifications related to ragdoll models. Disabling third-party content downloads (e.g., using console commands cl_allowdownload 0 and cl_downloadfilter all) can reduce exposure. However, no explicit detection commands are given in the provided resources. [2]
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include applying the official patches released by Valve for affected Source games to fix the nexttoken function to enforce bounds checking. For independently developed games using the Source SDK, manually apply the patch to modify nexttoken to accept a token length parameter and prevent buffer overflow. Enable Address Space Layout Randomization (ASLR) for all executables, including steamclient.dll, to make exploitation harder. Disable third-party content downloads by setting console commands cl_allowdownload 0 and cl_downloadfilter all to reduce attack surface. Sandboxing Source games to restrict resource access and prevent process creation is also recommended. Additionally, isolate Source games from business networks and avoid installing them on work devices to prevent targeted network breaches or malware deployment. [2]