CVE-2015-1341
High · 7.8CVSS
7.8
EPSS
0.4%
Published
Apr 22, 2019
CISA due date
—
Cloudanix analysis
A flaw in Ubuntu's crash reporting tool lets a regular user trick the system into running their own code with full administrator rights.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Privilege Gain
- Component
- Application
- Class
- Privilege Escalation
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
Apport's crash handling logic inspects a Python process command line containing -m and then imports an arbitrary module from sys.path as the root user, allowing local attackers to execute code with elevated privileges.
Why it matters to the business
Attackers on the same machine can gain full administrative control, leading to data theft, persistence, or ransomware deployment; the issue affects many Ubuntu systems but has seen no widespread exploitation.
How an attack unfolds
An attacker places a malicious Python module in a directory that appears in sys.path, runs a Python program via python -m to trigger a crash, and Apport's handler imports the attacker-controlled module while running with root privileges.
How to fix it
Upgrade Apport to version 2.19.2 or later on all affected Ubuntu releases; apply the latest package updates from Canonical that contain the corrected crash-handling logic.
How to confirm the fix worked
Confirm the installed Apport package version is at least 2.19.2, review Apport source for the fixed _python_module_path function, and test that python -m invocations no longer allow arbitrary imports during crash handling.
Typical attack path
- Create a malicious Python module in a writable directory on sys.path.
- Execute a Python process with the -m flag to trigger a core dump.
- Wait for Apport to process the crash and import the planted module.
- Obtain root-level code execution from the imported module.
How to detect it
Inspect system logs for Apport invocations involving python -m command lines, look for unexpected Python module imports or file creations in sys.path directories around crash events, and review process trees where apport runs immediately after a python process.
What your security team should do
- Prioritize patching Apport on all Ubuntu systems within standard maintenance windows.
- Monitor package repositories for backported fixes on older Ubuntu releases.
- Restrict untrusted users from writing to directories in Python sys.path used by system processes.
- Review logs for unexpected Python imports during Apport crash handling.
The record
Any Python module in sys.path can be imported if the command line of the process triggering the coredump is Python and the first argument is -m in Apport before 2.19.2 function _python_module_path.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:14.04:LTS | apport | 0 | 2.14.1-0ubuntu3.18 |
| Ubuntu:16.04:LTS | apport | 0 | 2.19.2-0ubuntu1 |
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-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
- CVE-2015-1324 Apport before 2.17.2-0ubuntu1.1 as packaged in Ubuntu 15.04, before 2.14.70ubuntu8.5 as… Also affects apport