Cyber Posture

CVE-2026-31516

High

Published: 22 April 2026

Published
22 April 2026
Modified
28 April 2026
KEV Added
Patch
CVSS Score 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0001 1.8th percentile
Risk Priority 16 60% EPSS · 20% KEV · 20% CVSS

Summary

CVE-2026-31516 is a high-severity Race Condition (CWE-362) vulnerability in Linux Linux Kernel. Its CVSS base score is 7.8 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked at the 1.8th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified are NIST 800-53 SI-2 (Flaw Remediation) and RA-5 (Vulnerability Monitoring and Scanning).

Threat & Defense at a Glance

What attackers do: exploitation maps to Exploitation for Privilege Escalation (T1068). What defenders deploy: see the NIST 800-53 controls recommended below.
Threat & Defense Details

Mitigating Controls (NIST 800-53 r5)AI

prevent

Directly mitigates CVE-2026-31516 by requiring timely remediation through application of the upstream Linux kernel patch that synchronizes policy_hthresh.work in xfrm_policy_fini() during netns teardown.

detect

Vulnerability monitoring and scanning identifies the presence of CVE-2026-31516 in kernel versions, enabling proactive patching before local exploitation.

prevent

Kernel memory protection mechanisms like KASLR and SMEP hinder exploitation of the use-after-free in xfrm_hash_rebuild() even if the race condition occurs.

MITRE ATT&CK Enterprise TechniquesAI

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
Why these techniques?

Local kernel UAF race condition (XFRM netns teardown) directly enables arbitrary code execution from low-privileged context, matching T1068 Exploitation for Privilege Escalation.

Confidence: HIGH · MITRE ATT&CK Enterprise v18.1

NVD Description

In the Linux kernel, the following vulnerability has been resolved: xfrm: prevent policy_hthresh.work from racing with netns teardown A XFRM_MSG_NEWSPDINFO request can queue the per-net work item policy_hthresh.work onto the system workqueue. The queued callback, xfrm_hash_rebuild(), retrieves the enclosing struct…

more

net via container_of(). If the net namespace is torn down before that work runs, the associated struct net may already have been freed, and xfrm_hash_rebuild() may then dereference stale memory. xfrm_policy_fini() already flushes policy_hash_work during teardown, but it does not synchronize policy_hthresh.work. Synchronize policy_hthresh.work in xfrm_policy_fini() as well, so the queued work cannot outlive the net namespace teardown and access a freed struct net.

Deeper analysisAI

CVE-2026-31516 is a race condition vulnerability in the Linux kernel's XFRM (IPsec) subsystem. It arises when an XFRM_MSG_NEWSPDINFO request queues the per-net work item policy_hthresh.work onto the system workqueue. The callback function xfrm_hash_rebuild() retrieves the enclosing struct net via container_of(), but if the network namespace (netns) is torn down before the work executes, the struct net may have been freed, leading to a use-after-free dereference of stale memory. The vulnerability is rated with a CVSS v3.1 base score of 7.8 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) and is associated with CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization of Critical Sections).

A local attacker with low privileges can exploit this vulnerability by triggering the XFRM_MSG_NEWSPDINFO request and then racing to tear down the netns before the queued work runs. Successful exploitation could result in high-impact confidentiality, integrity, and availability violations, such as kernel crashes, data corruption, or potential arbitrary code execution due to the use-after-free access to freed memory.

The provided references point to upstream Linux kernel stable patches that mitigate the issue. These commits synchronize policy_hthresh.work in xfrm_policy_fini() during netns teardown, ensuring the queued work cannot outlive the namespace and access freed struct net memory. Security practitioners should apply these patches to affected kernel versions.

Details

CWE(s)

Affected Products

linux
linux kernel
3.18, 7.0 · 3.18.1 — 6.12.80 · 6.13 — 6.18.21 · 6.19 — 6.19.11

CVEs Like This One

CVE-2026-23411Same product: Linux Linux Kernel
CVE-2026-23004Same product: Linux Linux Kernel
CVE-2026-43023Same product: Linux Linux Kernel
CVE-2026-23161Same product: Linux Linux Kernel
CVE-2026-31700Same product: Linux Linux Kernel
CVE-2026-31761Same product: Linux Linux Kernel
CVE-2026-23169Same product: Linux Linux Kernel
CVE-2026-23393Same product: Linux Linux Kernel
CVE-2026-23410Same product: Linux Linux Kernel
CVE-2026-23440Same product: Linux Linux Kernel

References