CVE-2026-139129

xattr: always invoke cap_convert_nscap() for security.capability writes

No CVSS score yet EPSS 0.37%

Published 30 Nov 2026 Updated 30 Nov 2026 CNA: Linux

Check your servers for CVE-2026-139129

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-139129 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

In the Linux kernel, the following vulnerability has been resolved:

xattr: always invoke cap_convert_nscap() for security.capability writes

Commit 8db6c34f1dbc ("Introduce v3 namespaced file capabilities") changed cap_inode_setxattr() to return 0 unconditionally for XATTR_NAME_CAPS ("security.capability") and moved capability validation into cap_convert_nscap(), but placed the call inside the "if (size)" block in setxattr(). Commit 7c03e2cda4a5 ("vfs: move cap_convert_nscap() call into vfs_setxattr()") preserved that "size &&" condition in vfs_setxattr():

if (size && strcmp(name, XATTR_NAME_CAPS) == 0) { error = cap_convert_nscap(idmap, dentry, &value, size); ... }

For security.* extended attributes, xattr_permission() skips inode_permission(MAY_WRITE) and leaves permission checks to the security module, while cap_inode_setxattr() returns 0 for XATTR_NAME_CAPS assuming cap_convert_nscap() has already validated the write. Because __vfs_setxattr() treats size == 0 as an empty attribute write (setting value = "") rather than a removal, calling setxattr(2) on "security.capability" with size == 0 bypasses cap_convert_nscap() and allows an unprivileged caller without CAP_SETFCAP or write permission on the target inode to write a 0-byte security.capability xattr (or overwrite an existing one).

When that binary is subsequently executed, get_vfs_caps_from_disk() reads the 0-byte security.capability xattr and fails the size < sizeof(magic_etc) check with -EINVAL, causing execve(2) to fail with -EINVAL.

Always invoke cap_convert_nscap() when strcmp(name, XATTR_NAME_CAPS) == 0 regardless of size, so that 0-byte writes hit the existing !*ivalue / !validheader() checks in cap_convert_nscap() and are rejected with -EINVAL.

Exploitation

EPSS 0.37%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 33.0% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 8db6c34f1dbc8e06aa016a9b829b06902c3e1340, before 95d264a93340840b52d54ccf321dc7e4875d88b4
affected from 8db6c34f1dbc8e06aa016a9b829b06902c3e1340, before a0d86d8e7297fb51b924642fe256b4a8d70ff7c7
affected from 8db6c34f1dbc8e06aa016a9b829b06902c3e1340, before 136fbb8cba5236655a4e0be62b96a8f3bb4f3568
affected from 8db6c34f1dbc8e06aa016a9b829b06902c3e1340, before 3a0260fc82412405c00491efe2287650bcbfb373
affected from 8db6c34f1dbc8e06aa016a9b829b06902c3e1340, before 0f4a9e682f7fa5becc3af7204606d9bf4780e425
Other versions: unaffected
Linux
affected 4.14
unaffected before 4.14
unaffected from 6.6.163 up to and including 6.6.*
unaffected from 6.12.119 up to and including 6.12.*
unaffected from 6.18.65 up to and including 6.18.*
unaffected from 7.3.6 up to and including 7.3.*
unaffected 7.4-rc1 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-139129 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-139129

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-139129
trivy image --scanners vuln IMAGE | grep CVE-2026-139129

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2026-139129 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.