Skip to main content
Mallory
HighExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2022-0847: Dirty Pipe

Published Mar 7, 2022 · Updated 23 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS7.8High · v3.1
EPSS92.8%100th percentile
CISA KEVYesAdded Apr 25, 2022
In the wildActivePer CISA KEV
Vendors
Red HatFedora ProjectNetAppLinuxOvirtSiemensSonicwall
IdentifiersCVE-2022-0847CWE-665 · Improper Initialization

Dirty Pipe is a local privilege-escalation vulnerability in the Linux kernel pipe-buffer implementation. The copy_page_to_iter_pipe() and push_pipe() functions fail to initialize the flags member of newly created pipe_buffer structures, allowing stale PIPE_BUF_FLAG_CAN_MERGE values to persist. An unprivileged local attacker can abuse splice-based pipe operations to overwrite page-cache data backing otherwise read-only files, bypassing file write permissions and potentially obtaining root privileges. The vulnerability affects upstream kernels beginning with Linux 5.8 and was fixed in the 5.10.102, 5.15.25, and 5.16.11 releases; vendor kernels can have different affected and fixed version numbers because of backports.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation compromises file-data integrity by permitting unauthorized modification of read-only file-backed page-cache pages. Modifying security-sensitive account data or setuid-root executables can elevate an unprivileged process to root, enabling complete system compromise, access to sensitive information, and installation of privileged backdoors.

Mitigation

If you can’t patch tonight, do this now.

Until patching is complete, restrict untrusted local access and execution of untrusted applications to reduce exploitation opportunities. Monitor Auditd events for suspicious splice system-call patterns associated with Dirty Pipe exploitation; this provides detection rather than prevention. No vulnerability-specific preventive workaround is established here, and network access controls alone do not prevent exploitation by an attacker already executing locally.

Remediation

Patch, then assume compromise.

Install the latest vendor-supported kernel update addressing CVE-2022-0847 and reboot into the fixed kernel. Upstream fixes are available in Linux 5.10.102, 5.15.25, and 5.16.11 and subsequent releases of those branches. For distribution kernels, use the vendor's fixed package versions rather than relying solely on the upstream version number, because affected code and fixes may be backported.

Public exploits

Exploits

45 exploits validated by Mallory's analysis. Hidden: 13 rejected by Mallory's analysis as not a working exploit; 4 not yet analyzed, such as Exploit-DB entries. Showing the 25 most capable, earliest first.

View more in app →
cve_2022_0847_dirtypipe.rbThis repository contains a single Metasploit module implementing a local privilege escalation exploit for the Linux 'Dirty Pipe' vulnerability (CVE-2022-0847). The exploit targets Linux kernels from version 5.8 up to but not including 5.16.11, 5.15.25, and 5.10.102. The module works by overwriting a SUID binary (default: /bin/passwd) with a custom payload (default: a Meterpreter reverse shell), executing it to gain root privileges, and then restoring the original binary. The exploit requires a writable directory (default: /tmp) and a suitable SUID binary. The payload is customizable and generated by Metasploit, supporting multiple architectures. The module is weaponized, providing a reliable and automated method for local privilege escalation on vulnerable Linux systems. No network endpoints are hardcoded; the main fingerprintable endpoints are file paths used for exploitation.Disclosed Feb 20, 2022 · Framework: metasploit · ruby · localWeaponizedCVE-2022-0847This repository provides a proof-of-concept (PoC) exploit for the Dirty Pipe vulnerability (CVE-2022-0847) in Linux kernels 5.8 and later. The main file, Dirty-Pipe.sh, is a Bash script that generates a C source file (exp.c) containing the exploit code, compiles it, and then uses it to overwrite arbitrary file contents in the page cache. The script specifically targets /etc/passwd, backing it up to /tmp/passwd, and then modifies the root user's entry to allow privilege escalation. The exploit demonstrates the ability to write to files that are otherwise read-only or immutable, leveraging a flaw in the pipe buffer flags. The repository includes a README with usage instructions and environment details. The exploit is operational and demonstrates local privilege escalation on vulnerable Linux systems.r1is · Disclosed Mar 7, 2022 · bash · c · localOperationalCVE-2022-0847-DirtyPipe-ExploitThis repository contains a proof-of-concept exploit for the Dirty Pipe vulnerability (CVE-2022-0847) in the Linux kernel (5.8 and later, before patch). The main exploit is implemented in 'exploit.c', which demonstrates how to overwrite arbitrary file contents in the page cache, even for files that are read-only or immutable. The exploit specifically targets '/etc/passwd', overwriting the root user's password field to a known value ('aaron'), thereby allowing the attacker to gain root access via 'su'. The exploit also backs up the original '/etc/passwd' to '/tmp/passwd.bak' and restores it after exploitation. The repository includes a shell script ('compile.sh') for compiling the exploit, a README with usage instructions, and standard license and gitignore files. The attack vector is local privilege escalation, requiring the attacker to execute the exploit on a vulnerable system. The exploit is operational, providing a working payload and restoration mechanism.Arinerron · Disclosed Mar 7, 2022 · c · shell · localOperationalCVE-2022-0847This repository contains a proof-of-concept exploit for CVE-2022-0847, also known as 'Dirty Pipe', a local privilege escalation vulnerability in the Linux kernel (5.8 and later, prior to specific patched versions). The main exploit file, 'CVE-2022-0847.c', demonstrates how an unprivileged local user can overwrite arbitrary data in read-only files, specifically targeting '/etc/passwd' to set the root password to a known value. The exploit first backs up '/etc/passwd' to '/tmp/passwd.bak', then overwrites the root password entry, and finally spawns a root shell for the attacker. The repository also includes a shell script ('compile.sh') for compiling the exploit, a README with detailed vulnerability information and references, and a license file. The exploit is operational and provides a working local privilege escalation payload, but is not part of a larger exploitation framework.ZZ-SOCMAP · Disclosed Mar 8, 2022 · c · shell · localOperationalCVE-2022-0847-dirty-pipe-exploitThis repository contains a working exploit for CVE-2022-0847, also known as the Dirty Pipe vulnerability in Linux kernels 5.8 and later. The exploit is implemented in a single C file ('exploit.c'), which demonstrates how to leverage the vulnerability to overwrite arbitrary file contents in the page cache, even for files that are read-only or immutable. The exploit specifically targets '/etc/passwd', backing it up to '/tmp/passwd.bak', and then overwrites the root user's password entry to set the password to 'cspshivam'. After successful exploitation, it spawns a root shell, granting the attacker full root access. The README provides compilation and usage instructions, as well as guidance on restoring the original '/etc/passwd' file. The attack vector is local, requiring the attacker to execute the exploit on the vulnerable system. The repository is structured simply, with a license, a README, and the exploit code.cspshivam · Disclosed Mar 8, 2022 · c · localOperationaldirtypipez-exploitThis repository contains a proof-of-concept (PoC) exploit for the Dirty Pipe vulnerability (CVE-2022-0847) affecting Linux kernel 5.8 and later. The exploit is implemented in C (dirtypipez.c) and leverages a flaw in the Linux pipe subsystem to overwrite read-only files, specifically targeting SUID binaries. The exploit works by injecting a small ELF binary (embedded as 'elfcode') into the target SUID binary, which, when executed, drops a SUID root shell at /tmp/sh. The exploit then restores the original SUID binary and executes the dropped shell, granting the attacker a root shell. The README.md provides background on the vulnerability and credits the original discoverer. The exploit requires local access and does not target network services. The main fingerprintable endpoints are the file paths /tmp/sh (where the root shell is dropped) and /bin/sh (the shell executed by the payload).febinrev · Disclosed Mar 8, 2022 · c · localOperationalCVE-2022-0847-DockerThis repository demonstrates a working exploit for the Dirty Pipe vulnerability (CVE-2022-0847) in the Linux kernel. The exploit is implemented in C (exploit.c) and is designed to be run inside a Docker container with a vulnerable kernel, as set up by the provided Dockerfiles (alpine, debian, ubuntu variants). The exploit works by abusing a flaw in the Linux pipe implementation to overwrite arbitrary data in read-only files, specifically targeting /etc/passwd to set the root password to 'aaron'. After exploitation, it spawns a root shell and then restores the original /etc/passwd from a backup. The repository is structured for educational use, with a detailed README explaining the vulnerability, exploitation steps, and security implications. The main attack vector is local privilege escalation, requiring local access to the vulnerable system. The only fingerprintable endpoints are the file paths /etc/passwd and /tmp/passwd.bak, which are manipulated during exploitation.mrchucu1 · Disclosed Mar 8, 2022 · c · dockerfile · localOperationalCVE-2022-0847The repository contains four files: a standalone C exploit, a shell build helper, an Org-mode README, and a GPLv2 license. CVE-2022-0847.c implements Dirty Pipe exploitation rather than vulnerability detection. prepare_pipe() fills and drains a pipe to leave PIPE_BUF_FLAG_CAN_MERGE flags in reusable pipe buffers. main() then splices one byte from a read-only /etc/passwd descriptor into that pipe and writes a hardcoded replacement account record, exploiting stale flags to modify the file-backed page cache without normal file-write permission. The overwrite starts at offset 4, preserves the leading 'root', and stays within one page without extending the file. The post-exploitation sequence attempts to authenticate as root using password 'antx-soc', restore /etc/passwd from /tmp/passwd.bak, and launch a root shell. This is a basic hardcoded operational payload, not a framework module. Important reliability and safety issues remain: the argv array passed to execv lacks the required terminating NULL pointer; the backup loop stores fgetc() results in char rather than int; and restoration is neither guaranteed nor checked. Overwriting a fixed-length region can also damage subsequent account records until restoration succeeds. The predictable backup filename introduces additional file-handling risks. compile.sh only prints a banner and builds the C source into 'exploit'. README.org describes the vulnerability, affected kernels, fixes, and external references. Its Android applicability statement concerns the kernel vulnerability; this particular payload assumes a conventional Linux account database and su workflow, so Android exploitation is not established. CVE-2016-5195 appears only as a comparison, not as a target. There are no runtime network endpoints or download operations. Repository URL, revision, and archive size were not supplied; empty strings and zero represent unavailable metadata. Findings are based on static inspection, not execution.elbunkerhacker · Disclosed Mar 8, 2022 · c · shell · localOperationalCVE-2022-0847This repository provides a working proof-of-concept exploit for CVE-2022-0847, also known as 'Dirty Pipe', a local privilege escalation vulnerability in the Linux kernel (versions 5.8 and later, prior to specific patches). The main exploit file, CVE-2022-0847.c, demonstrates how an unprivileged local user can exploit a flaw in the Linux pipe implementation to overwrite arbitrary data in read-only files, specifically targeting /etc/passwd. The exploit first backs up /etc/passwd to /tmp/passwd.bak, then overwrites the root user's password entry to a known value, and finally spawns a root shell. The repository also includes a shell script (compile.sh) to compile the exploit, a README.org with detailed vulnerability information and references, and a GPL license file. The exploit is operational and provides a real privilege escalation path on vulnerable systems.4luc4rdr5290 · Disclosed Mar 8, 2022 · c · shell · localOperationalCVE-2022-0847-DirtyPipe-ExploitThis repository contains a proof-of-concept exploit for the Dirty Pipe vulnerability (CVE-2022-0847) affecting Linux kernel versions 5.8 through 5.10.101, 5.15.24, and 5.16.10. The exploit is implemented in C (dirtypipe.c) and demonstrates a local privilege escalation attack. It works by overwriting a SUID binary (default: /usr/bin/su) with a custom ELF payload that spawns a root shell at /tmp/sh. After execution, the exploit restores the original SUID binary to minimize detection. The README provides background on the vulnerability and mitigation steps. The exploit requires local access and the ability to execute binaries, and is operational with a hardcoded payload. No network endpoints are involved; the attack vector is purely local file system manipulation.Mustafa1986 · Disclosed Mar 9, 2022 · c · localOperationalDirtyPipePythonThis repository contains a Python exploit (dirty.py) for the Linux kernel vulnerability CVE-2022-0847, also known as Dirty Pipe. The exploit leverages the vulnerability to overwrite read-only files on disk, enabling privilege escalation to root. The script attempts several methods in order: overwriting /etc/passwd to set a known root password, overwriting /usr/bin/sudo or /usr/bin/su with a custom ELF binary that spawns a root shell, or modifying /etc/group to add the current user to the sudo group. The exploit drops a setuid root shell binary to /tmp/sh as part of its payload. The script is operational and provides a root shell if successful. It requires Python 3.10+ and targets local Linux systems vulnerable to Dirty Pipe. The repository includes a README with usage instructions and a LICENSE file. No network endpoints are involved; all actions are performed locally on the target system. The exploit also creates several backup and working files in /tmp for restoration and cleanup.crusoe112 · Disclosed Mar 11, 2022 · python · localOperationaldirtyPipe-automaticRootThis repository contains a Python exploit for the Dirty Pipe vulnerability (CVE-2022-0847) affecting Linux kernels 5.8 and above (prior to patching). The main file, dirtyPipe.py, provides two primary capabilities: (1) automatic privilege escalation to root by injecting a new root user into /etc/passwd and spawning a root shell, and (2) arbitrary file write to files that are normally read-only, immutable, or on read-only mounts. The exploit leverages the Dirty Pipe bug to bypass standard file permission checks. The script requires Python 3.10 or above and must be run on a vulnerable Linux system. The repository is structured simply, with a README, LICENSE, and the exploit script. The main attack vector is local privilege escalation, and the most fingerprintable endpoints are the /etc/passwd file (for privilege escalation) and /bin/su (for shell access).nanaao · Disclosed Mar 12, 2022 · python · localOperationalCVE-2022-0847-DirtyPipe-ExploitsThis repository contains two operational local privilege escalation exploits for the Linux Dirty Pipe vulnerability (CVE-2022-0847). The structure includes two C source files (exploit-1.c and exploit-2.c), a bash compilation script (compile.sh), and a detailed README.md. - exploit-1.c overwrites /etc/passwd to set the root password to 'piped', spawns a root shell, and restores the original passwd file after use. It backs up the original /etc/passwd to /tmp/passwd.bak. - exploit-2.c hijacks a specified SUID root binary (e.g., /usr/bin/sudo) by injecting a small SUID ELF payload that drops a root shell at /tmp/sh, then attempts to restore the original binary. Both exploits require local access and a vulnerable Linux kernel (5.8+ up to patched versions). The repository is well-documented and provides both the exploit code and usage instructions. No network endpoints are involved; all actions are performed locally on the target system. The exploits are operational and provide a root shell upon successful execution.AlexisAhmed · Disclosed Mar 12, 2022 · c · bash · localOperationalCVE-2022-0847-DirtyPipe-Container-BreakoutThis repository is a Proof-of-Concept (PoC) exploit for CVE-2022-0847 (DirtyPipe), specifically targeting container breakout scenarios. The exploit is implemented in C (dirtypipe.c) and uses a custom minimal ELF binary written in assembly (runc_smoll.nasm) as the payload. The Makefile automates building the payload and the malicious libseccomp.so, while the Dockerfile sets up a vulnerable container environment by replacing the system's libseccomp and runc binaries. The exploit works by leveraging DirtyPipe to overwrite /proc/self/exe (the running runc binary) with the attacker's payload, which, when executed, prints a message and spawns a reverse shell to the attacker's host (172.17.0.2-5:1337). The repository is well-structured for demonstration and research purposes, providing all necessary components to reproduce the exploit in a controlled environment.jpts · Disclosed Mar 15, 2022 · c · assembly · localOperationalCVE-2022-0847_dirty-pipeThis repository contains a proof-of-concept (PoC) exploit for the Dirty Pipe vulnerability (CVE-2022-0847) affecting Linux kernel 5.8 and later. The exploit is implemented in a single C file (dirtypipez.c) and is designed to be compiled and run locally by an unprivileged user. It works by exploiting a flaw in the Linux kernel's pipe buffer handling, allowing the attacker to overwrite arbitrary read-only files in the page cache. The exploit specifically targets a SUID binary (such as /bin/su), overwriting its contents with a small embedded ELF payload that, when executed, drops a SUID root shell at /tmp/sh. The exploit then restores the original SUID binary and spawns a root shell for the attacker. The README.md provides background on the vulnerability, usage instructions, and credits. The exploit does not require network access and is purely local privilege escalation. The main fingerprintable endpoints are the SUID binary targeted (e.g., /bin/su), the dropped shell at /tmp/sh, and the use of /bin/sh for root shell access.LudovicPatho · Disclosed Mar 18, 2022 · c · localOperationallinux-privilege-escalationThis repository provides two operational local privilege escalation exploits for the Linux 'Dirty Pipe' vulnerability (CVE-2022-0847). The structure includes two C exploits (exploit-1.c and exploit-2.c), a bash script to check kernel vulnerability (check.sh), and a compilation script (compile.sh). - exploit-1.c backs up /etc/passwd, overwrites the root password with a known value ('piped'), spawns a root shell, and restores the original passwd file upon shell exit. - exploit-2.c targets a specified SUID binary (e.g., /usr/bin/sudo), injects a minimal SUID shell payload, executes it to drop a root shell at /tmp/sh, and then restores the original SUID binary. The exploits require local access and a vulnerable kernel. The repository is well-structured for operational use, providing both detection (check.sh) and exploitation capabilities. Key fingerprintable endpoints include /etc/passwd, /tmp/passwd.bak, and /tmp/sh. The payloads are implemented in C and provide direct root shell access.rexpository · Disclosed Apr 17, 2022 · c · bash · localOperationalCVE-2022-0847-DirtyPipe-ExploitsThis repository contains two operational local privilege escalation exploits for the Linux Dirty Pipe vulnerability (CVE-2022-0847). The first exploit (exploit-1.c) overwrites the /etc/passwd file to set the root password to a known value ('piped'), spawns a root shell, and restores the original passwd file after use. The second exploit (exploit-2.c) hijacks a SUID binary (such as /usr/bin/sudo) by overwriting its contents with a small ELF payload that drops a SUID root shell at /tmp/sh, then restores the original binary and executes the root shell. Both exploits require local access and a vulnerable Linux kernel. The repository includes a bash script (compile.sh) to compile both exploits and a README.md with detailed usage instructions and background on the vulnerability. The main targets are system files (/etc/passwd) and SUID binaries, with the goal of obtaining a root shell on the affected system.eduquintanilha · Disclosed Aug 1, 2022 · c · bash · localOperationalCVE-2022-0847This repository contains two C source files (dirty.c and dirtypipe2.c) implementing exploits for the Linux kernel vulnerability CVE-2022-0847, known as Dirty Pipe. The exploit leverages a flaw in the Linux kernel's pipe buffer handling to overwrite read-only files in the page cache, specifically targeting SUID binaries. The exploit works by overwriting a SUID binary with a small ELF payload that, when executed, spawns a root shell and drops a SUID shell at /tmp/sh. The original SUID binary is then restored to minimize detection. The dirtypipe2.c variant automates the process by scanning a list of common SUID binaries and attempting the exploit on each until successful. The exploit is operational and provides a root shell if the target is vulnerable. The repository is structured with a README.md (instructions and affected kernel versions), two exploit source files, and an image directory. The main attack vector is local privilege escalation on Linux systems running kernel 5.8 or newer.EagleTube · Disclosed Aug 13, 2022 · c · localOperationallinux-This repository contains a local privilege escalation exploit for CVE-2022-0847 (Dirty Pipe) targeting vulnerable Linux kernel versions (5.8 <= version < 5.16.11 / 5.15.25 / 5.10.102). The main exploit is implemented in 'payload.c', which leverages the Dirty Pipe vulnerability to overwrite the root user's password in /etc/passwd, setting it to a known value ('aaron'). The exploit first backs up the original /etc/passwd to /tmp/passwd.bak, performs the overwrite, and then spawns a root shell for the attacker. After exploitation, it restores the original /etc/passwd file. The exploit requires local access to the target system and does not involve any network communication. The repository also includes a README (in Chinese) briefly describing the target kernel versions, and a LICENSE file. The exploit is operational and provides a working payload for privilege escalation.qwert419 · Disclosed Nov 21, 2022 · c · localOperationaldirty-pipe-pocThis repository contains a Python proof-of-concept exploit for CVE-2022-0847, also known as the 'Dirty Pipe' vulnerability in the Linux kernel. The exploit is implemented in 'poc.py' and is designed to escalate privileges by adding the current user to the 'sudo' group in the '/etc/group' file. The exploit works by abusing the Dirty Pipe vulnerability to overwrite arbitrary data in the '/etc/group' file, specifically modifying the sudo group entry. Before making changes, the script creates a backup of '/etc/group' at '/tmp/group_backup'. The exploit requires Python 3.10 due to its use of the 'os.splice' system call. The attack vector is local privilege escalation, and the exploit is operational, providing a working method to gain root privileges on vulnerable Linux systems. The repository structure is simple, consisting of a README.md with usage instructions and a single exploit script (poc.py).0xeremus · Disclosed Jun 20, 2023 · python · localOperationalDirtyPipeThis repository contains a C implementation of the Dirty Pipe exploit (CVE-2022-0847) targeting the Linux kernel. The main file, dpipe.c, is a modular and user-friendly exploit that allows local privilege escalation by overwriting arbitrary files, most notably /etc/passwd, to set the root password to a known value ('el3ph@nt!'). The exploit can also be used to overwrite arbitrary files at a specified offset, provided the attacker has local access. The exploit first creates a backup of the target file (e.g., /etc/passwd to /tmp/passwd.bak), then uses the Dirty Pipe vulnerability to overwrite file contents without proper permissions. The README provides detailed usage instructions and demonstrates both privilege escalation and arbitrary file overwrite. The code is operational and ready for use on vulnerable Linux systems. No network endpoints are hardcoded, but the README suggests downloading the compiled binary via HTTP for deployment. The attack vector is local, requiring code execution on the target system.n3rada · Disclosed Oct 15, 2023 · c · localOperationalDirty-Pipe-ExploitThis repository contains a proof-of-concept exploit for the Dirty Pipe vulnerability (CVE-2022-0847) affecting Linux kernel versions 5.8 and later. The exploit is implemented as a Bash script (Exploit.sh) that generates and compiles a C program (exp.c). The C program leverages the Dirty Pipe bug to overwrite arbitrary file contents in the page cache, even if the file is read-only, immutable, or on a read-only mount. The script demonstrates exploitation by targeting /etc/passwd, allowing an unprivileged user to modify the root password entry and escalate privileges to root. The script also backs up the original /etc/passwd to /tmp/passwd and provides instructions to restore it. The exploit requires local code execution on a vulnerable Linux system. The repository structure is simple, consisting of the main exploit script and a README describing the vulnerability and its impact.mithunmadhukuttan · Disclosed Jan 8, 2025 · bash · c · localOperationalCVE-2022-0847This repository contains a local privilege escalation exploit for the Linux kernel vulnerability CVE-2022-0847, also known as 'Dirty Pipe'. The exploit is implemented in C (exploit.c) and is accompanied by a README.md with usage instructions and background information. The exploit works by abusing a flaw in the Linux kernel's pipe buffer handling to overwrite the contents of a SUID binary (such as /bin/passwd) with a small embedded ELF payload. This payload, when executed, creates a SUID root shell at /tmp/sh, which is then executed to provide the attacker with a root shell. After execution, the exploit attempts to restore the original SUID binary. The exploit targets Linux kernel versions 5.8 and later, up to the fixed versions (5.16.11, 5.15.25, 5.10.102). The attack vector is local, requiring the attacker to have access to the target system. The main fingerprintable endpoints are the file paths /tmp/sh (where the root shell is dropped) and /bin/sh (executed by the payload). The repository is structured simply, with one exploit source file and a README.RogelioPumajulca · Disclosed Feb 9, 2025 · c · localOperationalDirtyPipe-BSIThis repository contains a proof-of-concept exploit for the Dirty Pipe vulnerability (CVE-2022-0847) in the Linux kernel. The exploit is written in C (exploit.c) and is accompanied by a shell script (compile.sh) for compilation and a README.md with usage instructions. The exploit works by abusing the Dirty Pipe vulnerability to overwrite the root user's password hash in /etc/passwd, setting it to a known value. It first backs up the original /etc/passwd to /tmp/passwd.bak, performs the overwrite, and then spawns a root shell. After gaining root access, it restores the original /etc/passwd file. The attack vector is local privilege escalation, requiring local access to the vulnerable system. The main fingerprintable endpoints are the /etc/passwd and /tmp/passwd.bak files, as well as the use of /bin/sh for shell access. The exploit is operational and provides a working privilege escalation path on unpatched Linux systems vulnerable to Dirty Pipe.cypherlobo · Disclosed Mar 25, 2025 · c · shell · localOperationaldirtypipeThis repository is a Rust implementation of the DirtyPipe (CVE-2022-0847) local privilege escalation exploit for Linux. The exploit allows a local attacker to overwrite arbitrary files, including SUID binaries, by abusing a flaw in the Linux kernel's pipe buffer handling. The main entry point is 'src/main.rs', which parses command-line arguments to select between two modes: 'overwrite' (arbitrary file overwrite) and 'suid' (privilege escalation by overwriting a SUID binary, defaulting to /usr/bin/passwd). The exploit checks the kernel version for vulnerability, backs up the target file to /tmp, and then uses a pipe-based technique to overwrite the file at a specified offset. For privilege escalation, a custom SUID payload is generated using 'gen_suid.py' (Python, pwntools) and 'loader.asm' (assembly), which creates a minimal ELF binary that spawns a root shell. The repository is well-structured, with clear separation between exploit logic, helpers, and payload generation scripts. No network endpoints are present; all actions are performed locally on the target system.morgenm · Disclosed Jul 1, 2025 · rust · python · localOperational
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Fedora ProjectFedoraoperating_system
LinuxLinux Kerneloperating_system
NetAppH300e Firmwareoperating_system
NetAppH300s Firmwareoperating_system
NetAppH410c Firmwareoperating_system
NetAppH410s Firmwareoperating_system
NetAppH500e Firmwareoperating_system
NetAppH500s Firmwareoperating_system
NetAppH700e Firmwareoperating_system
NetAppH700s Firmwareoperating_system
OvirtOvirt-Engineapplication
Red HatEnterprise Linux Eusoperating_system
Red HatEnterprise Linux For Ibm Z Systemsoperating_system
Red HatEnterprise Linux For Ibm Z Systems Eusoperating_system
Red HatEnterprise Linux For Power Little Endianoperating_system
Red HatEnterprise Linux For Power Little Endian Eusoperating_system
Red HatEnterprise Linux For Real Timeoperating_system
Red HatEnterprise Linux For Real Time For Nfvoperating_system
Red HatEnterprise Linux For Real Time For Nfv Tusoperating_system
Red HatEnterprise Linux For Real Time Tusoperating_system
Red HatEnterprise Linux Server Ausoperating_system
Red HatEnterprise Linux Server For Power Little Endian Update Services For Sap Solutionsoperating_system
Red HatEnterprise Linux Server Tusoperating_system
Red HatEnterprise Linux Server Update Services For Sap Solutionsoperating_system
Red HatRed Hat Codeready Linux Builderapplication
Red HatRed Hat Enterprise Linuxoperating_system
Red HatVirtualization Hostapplication
SiemensScalance Lpe9403 Firmwareoperating_system
SonicwallSma1000 Firmwareoperating_system
FAQ

Frequently asked questions

Is CVE-2022-0847 exploited in the wild?
Yes. As of Oct 25, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Apr 25, 2022.
Is there a public exploit for CVE-2022-0847?
Yes. Mallory tracks 45 public exploits or proofs of concept for CVE-2022-0847, the earliest disclosed Feb 20, 2022.
Is there a patch for CVE-2022-0847?
Install the latest vendor-supported kernel update addressing CVE-2022-0847 and reboot into the fixed kernel. Upstream fixes are available in Linux 5.10.102, 5.15.25, and 5.16.11 and subsequent releases of those branches.
What products are affected by CVE-2022-0847?
Linux Kernel, Red Hat Enterprise Linux Eus, Red Hat Enterprise Linux For Ibm Z Systems, Red Hat Enterprise Linux For Ibm Z Systems Eus, Red Hat Enterprise Linux For Power Little Endian, and at least 24 more.
How severe is CVE-2022-0847?
CVE-2022-0847 has a CVSS v3.1 score of 7.8 (High) and an EPSS score of 92.8% (100th percentile) as of Oct 25, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidence10Every report linking this CVE to a named adversary.
Associated malware7Malware families linked to this CVE, with evidence and IOCs.
Detection signatures1YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity18Community discussion across Reddit, Mastodon, and other social sources.