Skip to main content
Mallory
HighExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2021-22555: Linux Netfilter Compatibility Heap Out-of-Bounds Write Privilege Escalation

Published Jul 7, 2021 · Updated 26 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
EPSS78.7%100th percentile
CISA KEVYesAdded Oct 6, 2025
In the wildActivePer CISA KEV
Vendors
NetAppVMwareBrocade Communications SystemsLinux
IdentifiersCVE-2021-22555CWE-787 · Out-of-bounds Write

CVE-2021-22555 is a heap out-of-bounds write in the Linux kernel Netfilter x_tables compatibility function xt_compat_target_from_user(), introduced in Linux v2.6.19-rc1. The flaw occurs when processing IPT_SO_SET_REPLACE or IP6T_SO_SET_REPLACE setsockopt requests from 32-bit processes on 64-bit systems. A local attacker able to reach the affected operation can corrupt kernel heap memory, potentially escalating privileges or causing denial of service. User and network namespaces can expose the vulnerable operation to otherwise unprivileged users on affected configurations.

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 can elevate a local user's privileges and compromise system confidentiality, integrity, and availability. Kernel heap corruption can enable unauthorized code execution or cause a system crash and denial of service. Exploitation for Linux privilege escalation has been observed in Earth Krahang operations, and the vulnerability is listed in the CISA Known Exploited Vulnerabilities catalog.

Mitigation

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

On affected RHEL 8 systems that do not require user namespaces, set user.max_user_namespaces = 0 to prevent unprivileged namespace creation. Assess operational effects first, particularly for container workloads. Where namespaces cannot be disabled, apply a suitable seccomp policy to block the system calls needed to reach the vulnerable operation. These restrictions reduce exposure but do not replace installation of the kernel fix.

Remediation

Patch, then assume compromise.

Install the distribution-supported kernel update addressing CVE-2021-22555 and reboot into the patched kernel. Applicable updates include RHEL 8 RHSA-2021:3057, RHEL 7 RHSA-2021:3327, and RHEL 6 Extended Lifecycle Support RHSA-2025:17733. Rocky Linux 8 users should apply the packages specified by CIQ advisory crlsa-2021_3057. Where supported for the exact running kernel, install the applicable vendor kpatch live-patch update instead of requiring an immediate reboot. Verify remediation against vendor package advisories because backported fixes may not change the upstream kernel version.

Public exploits

Exploits

5 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit; 2 not yet analyzed, such as Exploit-DB entries.

View more in app →
netfilter_xtables_heap_oob_write_priv_esc.rbThis repository contains a single Metasploit module implementing a local privilege escalation exploit for Linux (CVE-2021-22555), targeting a heap out-of-bounds write vulnerability in the netfilter x_tables kernel code. The exploit is effective on Linux kernels from v2.6.19-rc1 up to and including 5.11, provided certain conditions are met (e.g., ip_tables module loaded, /proc/sys/kernel/msgmni >= 4096, not protected by LKRG or grsecurity). The module uploads a pre-compiled exploit binary and a user-specified payload (such as a Meterpreter shell) to a writable directory (default: /var/tmp), executes the exploit to gain root privileges, and then runs the payload as root. The module includes checks for kernel version and configuration to determine exploitability. The main file is written in Ruby and is structured according to Metasploit conventions, leveraging several Metasploit mixins for file operations, privilege escalation, and payload handling. No network endpoints are involved; the attack vector is purely local. The module references several URLs for further information and is operational, providing a working privilege escalation path if the target is vulnerable.Disclosed Jul 7, 2021 · Framework: metasploit · ruby · localWeaponizedCVE-2021-22555-ExploitThis repository contains a local privilege escalation exploit for CVE-2021-22555, a heap out-of-bounds write vulnerability in the Linux kernel's net/netfilter/x_tables.c. The exploit is implemented in C (cve_2021_22555.c) and is designed to be compiled and run on a vulnerable Linux system. The README provides compilation and usage instructions, as well as tested kernel versions (Ubuntu 5.8.0-48-generic and COS 5.4.89+). The exploit works by manipulating kernel memory via message queues, sockets, and pipe buffers to achieve arbitrary code execution in the kernel, bypassing SMAP and KASLR protections. Upon success, it checks for root privileges by accessing /etc/shadow, attempts to escape container namespaces by joining /proc/1/ns/*, and finally spawns a root shell (/bin/bash -i). The exploit is operational and provides a working local root shell on affected systems. No network endpoints are involved; all actions are performed locally on the target system.xyjl-ly · Disclosed Jul 16, 2021 · c · localOperationalCVE-2021-22555-PipeVersionThis repository contains a local privilege escalation exploit for CVE-2021-22555, targeting the Linux kernel (tested on versions 4.15 and 5.8). The exploit leverages a pipe-primitive technique to achieve kernel memory corruption, allowing it to overwrite the /usr/bin/mount binary with a SUID shell payload. The exploit is implemented in a single C file (exploit.c), which contains all the logic for namespace setup, memory spraying, exploitation, and payload delivery. The payload is an embedded ELF binary that, once written to /usr/bin/mount, can be executed to obtain a root shell. The README provides a brief overview and compilation instructions. The exploit requires local access to the target system and does not require KASLR, SMAP, SMEP, or KPTI bypasses due to the use of the pipe-primitive. No network endpoints are involved; the only fingerprintable endpoint is the file path /usr/bin/mount, which is overwritten during exploitation.veritas501 · Disclosed Apr 5, 2022 · c · localOperationalCVE-2021-22555-PocRepository contains a single C exploit (exploit.c) plus a short README. The code is a local Linux kernel privilege-escalation exploit targeting CVE-2021-22555 (netfilter/iptables heap out-of-bounds write). It is tailored for specific kernel builds via compile-time constants (notably Ubuntu 5.8.0-48-generic; an alternate CentOS 5.4.89 profile is present but disabled). High-level exploit flow (as evidenced by constants, structures, and the visible tail of the code): - Uses SysV message queues (msg_msg/msg_msgseg) for heap shaping and to create controlled fake objects. - Uses AF_UNIX socket buffers (skbuff) spraying (NUM_SOCKETS/NUM_SKBUFFS) to place attacker-controlled data in kernel heap. - Uses many pipes (NUM_PIPEFDS) and targets pipe_buffer objects; it forges/overwrites pipe_buffer->ops to point to a fake pipe_buf_operations table. - The fake ops->release is set to a kernel gadget (per-kernel-version gadget addresses) to gain control flow, then a kernel ROP chain is built (build_krop()) to call prepare_kernel_cred(0) and commit_creds() (addresses hardcoded per kernel profile), resulting in root. - After gaining root, it verifies by opening /etc/shadow, then attempts container escape by calling setns() on /proc/1/ns/mnt, /proc/1/ns/pid, and /proc/1/ns/net, cleans up message queues/sockets, and finally execve()s /bin/bash -i. No C2 or remote network endpoints are used by the exploit itself; it is a purely local LPE with post-exploitation namespace switching. The only network-relevant observable is the README’s ISO download URL for setting up a test environment.Spydomain · Disclosed Feb 2, 2026 · c · localOperationalCVE-2021-22555Repository contains a working local Linux kernel exploit for CVE-2021-22555 (netfilter/x_tables OOB write) adapted from Google security-research PoC. The main file (exploit.c) is a multi-stage LPE: (1) sets up a namespace sandbox, sockets, and SysV message queues; (2) triggers the x_tables OOB write and uses message-queue heap grooming to corrupt and locate a target message; (3) performs SMAP bypass and leaks kernel heap pointers; (4) bypasses KASLR by leaking a pipe_buffer/anon_pipe_buf_ops pointer and computes kernel base; (5) achieves kernel code execution by forging pipe_buffer ops and pivoting into a kernel ROP chain that calls prepare_kernel_cred/commit_creds to become root; then it attempts to escape a container by setns() into /proc/1 namespaces and finally spawns /bin/sh. Hardcoded gadget and symbol offsets (e.g., commit_creds, prepare_kernel_cred, anon_pipe_buf_ops, and multiple ROP gadgets) indicate it is tuned to a specific kernel build/config (example shown: Linux 5.11.14 with kaslr enabled). Supporting scripts: start.sh launches a QEMU VM with SMEP/SMAP enabled and KASLR ("kaslr" kernel arg) plus a GDB stub (-s). gdb_kernel.sh attaches GDB to localhost:1234 and sets breakpoints at key gadget addresses for debugging the exploit.glutton-su · Disclosed Feb 25, 2026 · c · bash · local (kernel) privilege escalation via netfilter/x_tables out-of-bounds write; heap spraying with SysV msg queues + sk_buffs + pipe_buffer to achieve kernel ROP, KASLR leak, SMAP bypass; optional container escape via setnsOperational
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
Brocade Communications SystemsFabric Operating Systemoperating_system
LinuxLinux Kerneloperating_system
NetAppAff 500f Firmwareoperating_system
NetAppAff A250 Firmwareoperating_system
NetAppAff A400 Firmwareoperating_system
NetAppC250 Firmwareoperating_system
NetAppC400 Firmwareoperating_system
NetAppCloud Backupapplication
NetAppFas 8300 Firmwareoperating_system
NetAppFas 8700 Firmwareoperating_system
NetAppH300s Firmwareoperating_system
NetAppH410c Firmwareoperating_system
NetAppH410s Firmwareoperating_system
NetAppH500s Firmwareoperating_system
NetAppH610c Firmwareoperating_system
NetAppH610s Firmwareoperating_system
NetAppH615c Firmwareoperating_system
NetAppH700s Firmwareoperating_system
NetAppHci Management Nodeapplication
NetAppSolidfireapplication
NetAppSolidfire Baseboard Management Controllerapplication
VMwareFabric Operating Systemoperating_system
FAQ

Frequently asked questions

Is CVE-2021-22555 exploited in the wild?
Yes. As of Oct 30, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Oct 6, 2025.
Is there a public exploit for CVE-2021-22555?
Yes. Mallory tracks 5 public exploits or proofs of concept for CVE-2021-22555, the earliest disclosed Jul 7, 2021.
Is there a patch for CVE-2021-22555?
Install the distribution-supported kernel update addressing CVE-2021-22555 and reboot into the patched kernel. Applicable updates include RHEL 8 RHSA-2021:3057, RHEL 7 RHSA-2021:3327, and RHEL 6 Extended Lifecycle Support RHSA-2025:17733.
What products are affected by CVE-2021-22555?
Linux Kernel, NetApp Aff 500f Firmware, NetApp Aff A250 Firmware, NetApp Aff A400 Firmware, NetApp C250 Firmware, and at least 17 more.
How severe is CVE-2021-22555?
CVE-2021-22555 has a CVSS v3.1 score of 7.8 (High) and an EPSS score of 78.7% (100th percentile) as of Oct 30, 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 evidence5Every report linking this CVE to a named adversary.
Associated malwareMalware 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 activity12Community discussion across Reddit, Mastodon, and other social sources.