What is ptrace?
ptrace is the Linux kernel's process-tracing facility, used by debuggers (like gdb), sandboxing tools, and system-call interception frameworks to observe and control another process's execution. It grants the tracer significant visibility and control over the traced process, so the kernel must be extremely careful about exactly what capabilities a tracing relationship confers — and to whom — especially when privileges change mid-trace.
Overview
CVE-2019-13272 is a privilege escalation vulnerability in kernel/ptrace.c caused by improper credential handling when a process is being traced by another, unprivileged process at the moment it changes its own privilege level (for example, by executing a setuid/setgid binary). By carefully orchestrating this sequence, a local unprivileged attacker can gain the ability to access a portion of the higher-privileged process's memory or capabilities, ultimately allowing escalation to root.
Technical Details
The flaw (CWE-269, improper privilege management) arises from a race condition: when an unprivileged process is granted a PTRACE_TRACEME-style tracing relationship over another process, and that traced process subsequently executes a binary that would normally grant it elevated privileges (a setuid root binary, for instance), the kernel's credential-transfer logic fails to correctly revoke the existing ptrace access rights that were granted under the process's prior, lower-privileged state. This allows the still-attached unprivileged tracer to retain a level of control or access appropriate only to the pre-privilege-change context, over a process that now holds elevated capabilities — effectively letting the attacker's own credentials ride along with the privilege escalation the traced process undergoes. The attack requires only local code execution and no special privileges to start, since setting up a ptrace relationship over a child process is an ordinary unprivileged operation.
Discovery
The vulnerability was discovered and reported to the Linux kernel security team by Jann Horn of Google Project Zero, a researcher well known for identifying numerous credential-handling and race-condition bugs across kernel ptrace and namespace code over the years.
Exploitation Context
CISA's KEV catalog listing confirms this vulnerability has been exploited in real-world attacks against unpatched Linux systems. As a local root-privilege-escalation primitive, it is most commonly used as a post-compromise step — after an attacker gains initial low-privileged code execution on a Linux host via a web application vulnerability, exposed service, or stolen credentials — to escalate to root and gain full control of the system.
Remediation
- Update to a Linux kernel version that includes the fix: mainline 5.3 or later, or the backported stable releases 5.1.17, 4.19.63, 4.14.137, and equivalent vendor-distributed kernel updates.
- Apply distribution-specific kernel security patches promptly, since most major distributions (Red Hat, Debian, Ubuntu, SUSE) backported this fix shortly after disclosure.
- Restrict which users and processes are permitted to use
ptracewhere feasible, using mechanisms like the Yama LSM'sptrace_scopesysctl to limit unprivileged process tracing. - Treat unpatched Linux kernels as a standing local-privilege-escalation risk even on systems without direct external exposure, since exploitation requires only local code execution.
- Audit systems for unexpected root-level process activity correlated with ptrace/debugging tool usage on hosts that remained unpatched.
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2019-13272 |
| Vendor / Product | Linux — Kernel |
| NVD Published | 2019-07-17 |
| NVD Last Modified | 2025-11-06 |
| CVSS 3.1 Score | 7.8 |
| CVSS 3.1 Vector | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Severity | HIGH |
| CISA KEV Added | 2021-12-10 |
| CISA KEV Deadline | 2022-06-10 |
| Known Ransomware Use | No |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2019-07-15 | Reported to the Linux kernel security team by Jann Horn (Google Project Zero) |
| 2019-07-17 | CVE published; fixed in mainline kernel and backported to stable branches (5.1.17, 4.19.63, 4.14.137, and later) |
| 2021-12-10 | Added to CISA Known Exploited Vulnerabilities catalog |
| 2022-06-10 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| NVD — CVE-2019-13272 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |