Skip to main content
Mallory
HighExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2022-2586: Linux kernel nf_tables cross-table use-after-free

Published Jan 8, 2024 · Updated 26 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days1 mention · peak 1 in a dayToday
CVSS7.8High · v3.1
EPSS1.8%79th percentile
CISA KEVYesAdded Jun 26, 2024
In the wildActivePer CISA KEV
Vendors
Linux Kernel OrganizationLinuxSiemensCanonical
IdentifiersCVE-2022-2586CWE-416 · Use After Free

CVE-2022-2586 is a use-after-free vulnerability in the Linux kernel's Netfilter nf_tables subsystem. An nft object or expression can reference an nft set belonging to a different table. Deleting the table containing that set frees it while the cross-table reference remains, creating a dangling reference that can subsequently be used. A local attacker with CAP_NET_ADMIN in a user or network namespace can trigger the flaw, potentially escalating privileges. The vulnerability is known to have been exploited.

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 enable local privilege escalation and arbitrary code execution with elevated privileges, compromising system confidentiality and integrity. The use-after-free can also compromise availability through kernel memory corruption or system crashes. This is a local vulnerability, not a directly remotely exploitable network-service flaw.

Mitigation

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

Red Hat identifies no standalone mitigation meeting its criteria for ease of deployment, broad applicability, and stability. Apply the vendor kernel update rather than relying on an unverified workaround.

Remediation

Patch, then assume compromise.

Install the applicable vendor-patched kernel and reboot into it. The upstream fix is identified in Linux 6.0-rc1 and restricts set-ID lookups to the intended table. RHEL fixes include kernel 4.18.0-425.3.1.el8 through RHSA-2022:7683, RHEL 8 real-time kernel updates through RHSA-2022:7444, RHEL 9 updates through RHSA-2022:8267 and RHSA-2022:7933, and RHEL 8.6 EUS kernel 4.18.0-372.91.1.el8_6 through RHSA-2024:0724. For other affected distributions, apply their corresponding security updates, including CIQ advisory ciqsa-2026_1743 for Rocky Linux 8.6. Use the fixed package appropriate to the distribution and support channel rather than comparing upstream version numbers alone.

Public exploits

Exploits

4 exploits validated by Mallory's analysis.

View more in app →
CVE-2022-2586-LPEThis repository contains a local privilege escalation (LPE) exploit for CVE-2022-2586, a use-after-free (UAF) vulnerability in the Linux kernel's nft_object subsystem. The main file, CVE-2022-2586.c, is a C program that leverages the vulnerability to gain root privileges on affected Linux systems. The exploit works by manipulating nftables objects to achieve a UAF condition, constructing a ROP chain to overwrite the kernel's modprobe_path with a path to a custom script (/tmp/x), and then triggering modprobe to execute this script as root. The script appends a new root user to /etc/passwd, granting the attacker root shell access. The exploit requires compilation with specific libraries and must be run on a vulnerable kernel. The repository also includes a README with basic usage instructions. Key fingerprintable endpoints include /tmp/p, /tmp/x, /etc/passwd, and /bin/unshare, as well as the use of localhost (127.0.0.1) for network triggering. The exploit is operational and provides a working payload for privilege escalation.aels · Disclosed Sep 3, 2022 · c · localOperational2022-LPE-UAFThis repository contains proof-of-concept (POC) exploit code for three Linux kernel vulnerabilities: CVE-2022-2585, CVE-2022-2586, and CVE-2022-2588. The structure includes three C source files (CVE-2022-2585.c, CVE-2022-2586.c, dirtycred.c) and a README.md file. Each C file targets a specific kernel vulnerability: - CVE-2022-2585.c demonstrates a UAF in POSIX CPU timers by manipulating timer objects and process forking/cloning. - CVE-2022-2586.c exploits a UAF in the netfilter nf_tables subsystem by creating and deleting tables, sets, and objects via netlink sockets, using the libmnl and libnftnl libraries. - dirtycred.c (related to CVE-2022-2588) targets a UAF in the cls_route traffic control filter, using raw netlink messages to manipulate kernel networking structures. All exploits are local privilege escalation POCs and require the attacker to execute code on a vulnerable Linux system. The README provides references to the original advisories and research papers. No weaponized payloads are included; the code is intended for research and demonstration purposes.pirenga · Disclosed Aug 23, 2022 · c · markdown · localPoC2022-LPE-UAFThis repository contains three proof-of-concept (PoC) exploits targeting use-after-free (UAF) vulnerabilities in the Linux kernel, specifically CVE-2022-2585 (POSIX CPU timer UAF), CVE-2022-2586 (nf_tables cross-table reference UAF), and CVE-2022-2588 (cls_route UAF). The structure consists of three C source files, each corresponding to one CVE, and a README.md providing context and references. The exploits are local privilege escalation PoCs that interact directly with kernel interfaces (such as netlink sockets and kernel objects) to trigger UAF conditions. No weaponized payloads are included; the code is intended for research and demonstration purposes. The endpoints involved are local files, netlink sockets, and kernel objects/tables. The repository is suitable for researchers or defenders seeking to understand or test these vulnerabilities on affected Linux systems.konoha279 · Disclosed Aug 24, 2022 · c · markdown · localPoCCVE-2022-2586This repository contains a local privilege escalation exploit for CVE-2022-2586, a use-after-free vulnerability in the Linux kernel's nft_object subsystem. The main file, 'exploit.c', is a sophisticated C program that leverages kernel ROP chains and netfilter manipulation to gain root privileges. The exploit works by crafting a ROP chain to overwrite the kernel's modprobe_path with '/tmp/x', dropping a script at /tmp/x that adds a root user to /etc/passwd, and then triggering modprobe to execute this script as root. The exploit uses several file endpoints (/tmp/p, /tmp/x, /etc/passwd, /bin/unshare) and localhost networking (127.0.0.1:1337) as part of its operation. The README provides compilation instructions. The exploit is operational and provides a root shell if successful. The code is well-structured, with clear separation of setup, exploitation, and cleanup phases.sniper404ghostxploit · Disclosed Nov 6, 2022 · c · localPoC
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
CanonicalUbuntu Linuxoperating_system
LinuxLinux Kerneloperating_system
Linux Kernel OrganizationLinuxapplication
SiemensSimatic S7-1500 Tm Mfp Firmwareoperating_system
SiemensSinec Osoperating_system
FAQ

Frequently asked questions

Is CVE-2022-2586 exploited in the wild?
Yes. As of Nov 2, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Jun 26, 2024.
Is there a public exploit for CVE-2022-2586?
Yes. Mallory tracks 4 public exploits or proofs of concept for CVE-2022-2586, the earliest disclosed Aug 23, 2022.
Is there a patch for CVE-2022-2586?
Install the applicable vendor-patched kernel and reboot into it. The upstream fix is identified in Linux 6.0-rc1 and restricts set-ID lookups to the intended table.
What products are affected by CVE-2022-2586?
Linux Kernel, Linux Kernel Organization Linux, Siemens Simatic S7-1500 Tm Mfp Firmware, Siemens Sinec Os, and Canonical Ubuntu Linux.
How severe is CVE-2022-2586?
CVE-2022-2586 has a CVSS v3.1 score of 7.8 (High) and an EPSS score of 1.8% (79th percentile) as of Nov 2, 2026.
Activity feed

Recent activity

16 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+11 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
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 evidence1Every 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 activityCommunity discussion across Reddit, Mastodon, and other social sources.