If you run Docker hosts or Kubernetes nodes on older kernels, give this one a look.
At a glance
- CVE: CVE-2021-22555
- Severity: 7.8 (High) on NVD. Google, which assigned the CVE, scored it 8.3 with a slightly different (adjacent-network) vector, and Red Hat rates it Important. Either way, it’s a local bug: an attacker has to be running code on the machine first.
- Affected: Linux from 2.6.19 up to (but not including) 4.4.267, 4.9.267, 4.14.231, 4.19.188, 5.4.113 and 5.10.31, and 5.11 before 5.12. Red Hat says RHEL 7 and 8 were affected (on RHEL 7 only privileged users can reach the bug) and RHEL 9 isn’t. Ubuntu 22.04 and newer aren’t affected.
- Known exploited: Yes. CISA added it to its Known Exploited Vulnerabilities (KEV) catalog on 2025-10-06, more than four years after it was disclosed. Public exploit code has been around since 2021.
What’s going on
Netfilter is the kernel’s firewall plumbing, the part iptables talks to. When a 32-bit program on a 64-bit kernel sets up iptables rules, the kernel converts the request between the 32-bit and 64-bit formats. That conversion got a buffer size wrong, so it wrote a few bytes of zeros past the end of a heap allocation.
A few bytes sounds harmless. It isn’t. Google’s researcher turned it into kernel code execution that gets past KASLR, SMAP and SMEP (the kernel’s main memory protections), and used it to break out of a Kubernetes pod in Google’s kCTF test cluster. The bug had been sitting in the kernel for about 15 years.
The attacker needs CAP_NET_ADMIN to reach the buggy code, which normal users don’t have. But on systems that allow unprivileged user namespaces, any user can create their own user and network namespace and get that capability inside it.
For web hosting, that means local privilege escalation plus container escape. If an attacker gets a shell through your web app, on the host or inside a container, this bug can take them to root on the host. That makes Docker hosts and Kubernetes nodes the juiciest targets.
Timeline
- Reported: 2021-04-06
- Fixed upstream: 2021-04-13
- Disclosed: 2021-07-07
- Distro patches: Red Hat shipped RHEL 8 fixes on 2021-08-10 and RHEL 7 fixes on 2021-08-31
- Added to CISA KEV: 2025-10-06
== UPDATE ==
Fixes have been out since 2021, so this is about catching the hosts that slipped through.
- Patch available: Yep.
- Fixed in: upstream 4.4.267, 4.9.267, 4.14.231, 4.19.188, 5.4.113, 5.10.31 and 5.12. Some distro examples: Ubuntu 20.04 kernel 5.4.0-74.83, Ubuntu 18.04 4.15.0-144.148, Debian 10 “buster” 4.19.194-1, RHEL 8 4.18.0-305.12.1.el8_4 and RHEL 7 3.10.0-1160.41.1.el7. Check your distro’s tracker (linked below) for your release.
- How to apply: update the kernel and reboot:
sudo apt update && sudo apt upgradeon Debian/Ubuntu,sudo dnf upgrade --refreshon RHEL 8 and friends, orsudo yum update kernelon RHEL/CentOS 7. Then checkuname -r. On Kubernetes, drain and reboot your nodes one at a time. - If you can’t patch yet: Red Hat’s mitigation is to stop unprivileged users from creating user namespaces. Add
user.max_user_namespaces = 0to a file in/etc/sysctl.d/and runsudo sysctl --system. Don’t do that on hosts whose containers need user namespaces; for those, Red Hat suggests a seccomp policy that blocks the syscalls involved instead.
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-22555
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-22555
- https://github.com/google/security-research/security/advisories/GHSA-xxx5-8mvq-3528
- https://google.github.io/security-research/pocs/linux/cve-2021-22555/writeup.html
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/netfilter/x_tables.c?id=b29c457a6511435960115c0f548c4360d5f4801d
- https://access.redhat.com/security/cve/CVE-2021-22555
- https://ubuntu.com/security/CVE-2021-22555
- https://security-tracker.debian.org/tracker/CVE-2021-22555