CVE-2016-9949
High · 7.8CVSS
7.8
EPSS
17.7%
Published
Dec 17, 2016
CISA due date
—
Cloudanix analysis
Error reporting software on some Linux systems could be tricked into running attacker-chosen commands instead of safely handling crash data.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Application
- Class
- RCE
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The vulnerability allows arbitrary Python code execution when Apport processes a crash report containing a CrashDB field that begins with '{' by directly evaluating the field contents as Python code in apport/ui.py.
Why it matters to the business
Attackers can gain full control over affected systems to steal data, install persistent malware, or disrupt operations; the issue has been publicly known for nearly a decade with working exploits available, though widespread impact is limited to systems still running the unpatched error-reporting component.
How an attack unfolds
An attacker prepares a specially crafted crash report file or input that includes a CrashDB value starting with '{' followed by malicious Python statements. When the report is processed on a vulnerable system, Apport evaluates the field as executable code, resulting in arbitrary command execution under the privileges of the Apport process.
How to fix it
Upgrade Apport to version 2.20.4 or later on all affected Ubuntu and Apport installations to eliminate the unsafe evaluation of the CrashDB field.
How to confirm the fix worked
Confirm the installed Apport version is 2.20.4 or newer; test by submitting a benign crash report containing a non-executable CrashDB value and verify that no code evaluation occurs.
Typical attack path
- Craft a malicious crash report containing a CrashDB field prefixed with '{' and arbitrary Python code.
- Deliver the report to the target via local file placement, user interaction, or automated crash submission paths.
- Trigger Apport to process the report through normal error-handling workflows.
- Apport evaluates the CrashDB field as Python, executing the attacker-supplied code.
- Attacker achieves code execution and proceeds with further actions such as persistence or data exfiltration.
How to detect it
Review system and application logs for unexpected Python code execution or unusual process spawns originating from Apport; examine any crash report files present on disk for fields beginning with '{' that contain executable statements.
What your security team should do
- Immediately inventory all systems running Apport and prioritize patching those still on versions before 2.20.4.
- Disable or restrict Apport crash reporting on high-value systems until patches are applied.
- Monitor for any remaining unpatched instances given the public exploit availability and long disclosure window.
The record
An issue was discovered in Apport before 2.20.4. In apport/ui.py, Apport reads the CrashDB field and it then evaluates the field as Python code if it begins with a "{". This allows remote attackers to execute arbitrary Python code.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:14.04:LTS | apport | 0 | 2.14.1-0ubuntu3.23 |
| Ubuntu:16.04:LTS | apport | 0 | 2.20.1-0ubuntu2.4 |
Related vulnerabilities
- CVE-2021-25682 It was discovered that the get_pid_info() function in data/apport did not properly parse… Also affects apport
- CVE-2020-11936 gdbus setgid privilege escalation Also affects apport
- CVE-2020-8831 Apport creates a world writable lock file with root ownership in the world writable… Also affects apport
- CVE-2019-11481 Kevin Backhouse discovered that apport would read a user-supplied configuration file with… Also affects apport
- CVE-2019-7307 Apport before versions 2.14.1-0ubuntu3.29+esm1, 2.20.1-0ubuntu2.19, 2.20.9-0ubuntu7.7… Also affects apport
- CVE-2015-1341 Any Python module in sys.path can be imported if the command line of the process… Also affects apport
- CVE-2018-6552 Apport does not properly handle crashes originating from a PID namespace allowing local… Also affects apport
- CVE-2017-14177 Apport through 2.20.7 does not properly handle core dumps from setuid binaries allowing… Also affects apport