CVE-2021-22555: Linux Kernel Heap Out-of-Bounds Write Vulnerability
Linux · Kernel · NVD published 2021-07-07 · posted 2025-10-06 · last modified 2026-10-13
What it is
A heap out-of-bounds write affecting Linux since v2.6.19-rc1 was discovered in net/netfilter/x_tables.c. This allows an attacker to gain privileges or cause a DoS (via heap memory corruption) through user name space
| Weakness | CWE-787 |
|---|---|
| CVSS vector | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (source: [email protected]) |
| CISA due date | 2025-10-27 (for US federal agencies under BOD; a good deadline for everyone) |
| ATT&CK tactics | Execution |
Exploitation evidence
First exploit evidence seen: 2021-07-07 (earliest date across the sources below).
Exploited in the wild
- CISA KEV: listed since 2025-10-06. Source
Public exploit code
Metasploit
exploit/linux/local/netfilter_xtables_heap_oob_write_priv_esc: Netfilter x_tables Heap OOB Write Privilege Escalation (disclosure 2021-07-07)
Exploit-DB
- EDB-50135: Linux Kernel 2.6.19 < 5.9 - 'Netfilter Local Privilege Escalation (2021-07-15, verified)
GitHub proof-of-concept repositories
13 public repositories from 12 accounts, first seen 2021-07-15. Most starred: veritas501/CVE-2021-22555-PipeVersion (40 stars), view repository.
Verify before running: public PoCs can be malicious. Read the code and only run it in an isolated lab. A PoC means exploit code is public, not that this CVE is exploited in the wild.
Sources: CISA KEV · Rapid7 Metasploit Framework module metadata · Exploit-DB (OffSec) · nomi-sec/PoC-in-GitHub.
Defend the Chain
The attack chain for CVE-2021-22555 laid across the MITRE ATT&CK Enterprise tactics. Solid cards come from the MITRE CTID KEV mappings; dashed cards are inferred by CVERadar from the CWE or description. Correct defences are real ATT&CK mitigations for that technique.
Pick a red technique card on the board, then choose the defence that stops it.
Defend against T1203 Exploitation for Client Execution Inferred
Inferred from CWE CWE-787
How to fix it
CISA required action
Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable. (source: CISA KEV)
Fixed versions
- linux linux kernel: upgrade to 4.4.267 or later (affected from 2.6.19)
- linux linux kernel: upgrade to 4.9.267 or later (affected from 4.5)
- linux linux kernel: upgrade to 4.14.231 or later (affected from 4.10)
- linux linux kernel: upgrade to 4.19.188 or later (affected from 4.15)
- linux linux kernel: upgrade to 5.4.113 or later (affected from 4.20)
- linux linux kernel: upgrade to 5.10.31 or later (affected from 5.5)
- linux linux kernel: upgrade to 5.12 or later (affected from 5.11)
Derived from the NVD CPE configuration (versionEndExcluding / versionEndIncluding). Always confirm with the vendor advisory.
Vendor advisories and patches
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/netfilter/x_tables.c?id=9fa492cdc160cd27ce1046cb36f47d3b2b1efa21 (CISA KEV notes)
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/netfilter/x_tables.c?id=b29c457a6511435960115c0f548c4360d5f4801d (CISA KEV notes)
- https://security.netapp.com/advisory/ntap-20210805-0010/ (CISA KEV notes)
- https://github.com/google/security-research/security/advisories/GHSA-xxx5-8mvq-3528 (CISA KEV notes)
MITRE ATT&CK mitigations for this chain
- M1050 Exploit Protection (for T1203) : Security applications that look for behavior used during exploitation such as Windows Defender Exploit Guard (WDEG) and the Enhanced Mitigation Experience Toolkit (EMET) can be used to mitigate some exploitation behavior. Control flow integrity checking is another way to potentially identify and stop a software exploi
- M1051 Update Software (for T1203) : Perform regular software updates to mitigate exploitation risk. Keeping software up-to-date with the latest security patches helps prevent adversaries from exploiting known vulnerabilities in client software, reducing the risk of successful attacks.
- M1048 Application Isolation and Sandboxing (for T1203) : Browser sandboxes can be used to mitigate some of the impact of exploitation, but sandbox escapes may still exist. Other types of virtualization and application microsegmentation may also mitigate the impact of client-side exploitation. Risks of additional exploits and weaknesses in those systems may still exist.
Detection Generic guidance
- Execution: Watch for the service process spawning shells or script interpreters (cmd.exe, powershell, sh, bash, python) via EDR process-tree rules.
Response checklist Generic guidance
- Inventory: find every instance of the affected product and version (include internet-facing and forgotten ones).
- Patch or mitigate per the vendor advisory; if you cannot patch, remove internet exposure or apply the vendor workaround.
- Assume compromise if the system was exposed before patching: hunt for the indicators in the advisory and review logs back to the disclosure date.
- Rotate credentials and secrets stored on or used by the affected system if compromise cannot be ruled out.
Sources
- NVD: CVE-2021-22555
- CVE.org record
- CISA Known Exploited Vulnerabilities catalog
- FIRST EPSS (2026-10-24)
- http://packetstormsecurity.com/files/163528/Linux-Kernel-Netfilter-Heap-Out-Of-Bounds-Write.html (Third Party Advisory, VDB Entry)
- http://packetstormsecurity.com/files/163878/Kernel-Live-Patch-Security-Notice-LSN-0080-1.html (Exploit, Third Party Advisory, VDB Entry)
- http://packetstormsecurity.com/files/164155/Kernel-Live-Patch-Security-Notice-LSN-0081-1.html (Exploit, Third Party Advisory, VDB Entry)
- http://packetstormsecurity.com/files/164437/Netfilter-x_tables-Heap-Out-Of-Bounds-Write-Privilege-Escalation.html (Exploit, Third Party Advisory, VDB Entry)
- http://packetstormsecurity.com/files/165477/Kernel-Live-Patch-Security-Notice-LSN-0083-1.html (Exploit, Third Party Advisory, VDB Entry)
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-22555 (US Government Resource)