CVE-2017-2888
High · 8.8CVSS
8.8
EPSS
3.1%
Published
Oct 11, 2017
CISA due date
—
Cloudanix analysis
A flaw in a widely used graphics library lets attackers run their own code on a computer simply by tricking a user into opening a specially made picture file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Integer overflow during RGB Surface creation in SDL 2.0.5 results in undersized memory allocation followed by a buffer overflow that enables arbitrary code execution when a crafted image is processed.
Why it matters to the business
Applications and games that rely on the vulnerable SDL library on Ubuntu, Debian, and other distributions can be compromised when users open malicious image files, allowing attackers to run code and potentially steal data or disrupt operations.
How an attack unfolds
An attacker supplies a specially crafted image file to any application that uses SDL 2.0.5 to load graphics. The library's surface creation routine performs an integer overflow, allocates too little memory, and a subsequent buffer overflow grants code execution in the context of the vulnerable process.
How to fix it
Upgrade the SDL library to a version newer than 2.0.5 in all affected packages on Ubuntu, Debian, and other distributions; rebuild or reinstall dependent applications against the fixed library.
How to confirm the fix worked
Confirm the installed SDL version is newer than 2.0.5 via package manager or library file inspection; attempt to load a known-triggering test image in a controlled environment to verify absence of the overflow.
Typical attack path
- Attacker crafts an image file that triggers the integer overflow in SDL surface creation
- Victim opens the file in an affected application that calls SDL image loading routines
- SDL performs the flawed allocation and buffer write
- Attacker payload executes within the application process
How to detect it
Review application logs and crash reports for SDL surface creation failures or abnormal memory operations when processing image files; examine process memory dumps for evidence of oversized image dimensions leading to allocation anomalies.
What your security team should do
- Inventory all systems and applications that link against SDL 2.0.5 or earlier
- Apply updates to the SDL package on Ubuntu, Debian, and other distributions immediately
- Block or sandbox applications that render untrusted image files until patched
- Monitor for new SDL releases and rebuild internal software against fixed versions
The record
An exploitable integer overflow vulnerability exists when creating a new RGB Surface in SDL 2.0.5. A specially crafted file can cause an integer overflow resulting in too little memory being allocated which can lead to a buffer overflow and potential code execution. An attacker can provide a specially crafted image file to trigger this vulnerability.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | libsdl2 | 0 | 2.0.6+dfsg1-4 |
| Debian:12 | libsdl2 | 0 | 2.0.6+dfsg1-4 |
| Debian:13 | libsdl2 | 0 | 2.0.6+dfsg1-4 |
| Debian:14 | libsdl2 | 0 | 2.0.6+dfsg1-4 |
| Debian:8 | libsdl2 | 0 | 2.0.2+dfsg1-6+deb8u2 |
| Debian:9 | libsdl2 | 0 | 2.0.5+dfsg1-2+deb9u2 |
| Mageia:5 | sdl2 | 0 | 2.0.3-4.1.mga5 |
| Mageia:6 | mingw-SDL2 | 0 | 2.0.5-1.mga6 |
| Mageia:6 | sdl2 | 0 | 2.0.5-2.1.mga6 |
| SUSE:Package Hub 12 | SDL2 | 0 | 2.0.5-7.1 |
| Ubuntu:16.04:LTS | libsdl2 | 0 | 2.0.4+dfsg1-2ubuntu2.16.04.2 |
| Ubuntu:18.04:LTS | libsdl2 | 0 | 2.0.8+dfsg1-1ubuntu1.18.04.1 |
| Ubuntu:18.04:LTS | libsdl2 | 0 | 2.0.8+dfsg1-1ubuntu1.18.04.4 |
| openSUSE:Tumbleweed | SDL2 | 0 | 2.0.16-2.3 |
| openSUSE:Tumbleweed | SDL2 | 0 | 2.32.8-1.1 |
Related vulnerabilities
- CVE-2018-3977 An exploitable code execution vulnerability exists in the XCF image rendering… Also affects mingw-SDL2
- CVE-2026-110264 An issue has been discovered in GitLab CE/EE affecting all versions from 7.0 before… CWE-190
- CVE-2026-53615 util-linux is a random collection of Linux utilities. CWE-190
- CVE-2026-106574 ImageMagick is free and open-source software used for editing and manipulating digital… CWE-190
- CVE-2026-106571 ImageMagick is free and open-source software used for editing and manipulating digital… CWE-190
- CVE-2026-75820 GNU Aspell contains an integer truncation vulnerability in the WritableDict::add()… CWE-190
- CVE-2026-102621 A vulnerability was identified in Freedesktop Poppler up to 26.08.0. CWE-190
- CVE-2026-102620 A vulnerability was determined in Freedesktop Poppler 26.06.0/26.07.0/26.08.0. CWE-190