Skip to content
Low 2.0

Kunai Mount Namespace Cache TOCTOU Allows Incorrect Event Resolution Against Host Files

CVE-2026-129919 First seen on SecPulse

Affected packages

PackageAffected → Fixed
kunai-projectKunai
≤ 0.6.2→ Not listed

This record does not list fixed versions. Check the article or the vendor advisory in the references for whether and where it is fixed.

Original description The description as published by the source.

Kunai, a security monitoring tool, contains a time-of-check to time-of-use (TOCTOU) race condition in its mount namespace (mnt ns) caching logic. When resolving a security event that references a specific process PID and an expected mount namespace, the Switcher::new function read /proc//ns/mnt to determine the target namespace and cached the result under the expected namespace key without verifying that the resolved namespace actually matched the expected one.

An attacker with local access could exploit this by either (1) arranging for the referenced PID to be reused by a process in a different namespace (e.g., the host namespace) before Kunai resolves it, or (2) calling unshare or setns on the target process after the event is generated but before the namespace is resolved. In either case, the wrong namespace (potentially the host's own namespace) would be cached under the container's namespace key.

The security impact is that subsequent container security events would be resolved against host filesystem paths rather than container paths. This undermines the integrity of the security monitoring data: container activity could be misattributed to the host, host activity could be misattributed to a container, and file-path-based detections or alerts would reference incorrect paths. An attacker could potentially use this to obscure malicious activity within a container by making it appear as benign host activity, or to generate misleading security alerts.

The vulnerability r…

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details