CVE-2026-129919 (GCVE-0-2026-129919)

Vulnerability from cvelistv5 – Published: 2026-11-16 13:49 – Updated: 2026-11-16 14:50
VLAI
Title
Kunai Mount Namespace Cache TOCTOU Allows Incorrect Event Resolution Against Host Files
Summary
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/<pid>/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 requires local access to the system and a specific timing window between event generation and namespace resolution. No remote attack vector or user interaction is required.
SSVC
Exploitation: none Automatable: no Technical Impact: partial
Supplier · CIRCL (v2.0.3)
Decision recorded 2026-11-16 13:44 UTC
Exploitation: none Automatable: no Technical Impact: partial
CISA Coordinator · CISA-ADP (v2.0.3)
Decision recorded 2026-11-16 14:50 UTC
CWE
  • CWE-367 - TOCTOU Race Condition
  • CWE-20 - Improper Input Validation
Assigner
CIRCL CNA under the ENISA root
CNA scorecard A 91/100 over 255 records in the last 180 days details
References
Impacted products
Vendor Product Version CPE status
kunai-project Kunai Affected: 0 , ≤ 0.6.2 (semver)
    cpe:2.3:a:kunai-project:kunai:*:*:*:*:*:*:*:*
Create a notification for this product.
GCVE extensions
bcp-05-x-01
AI-assisted vulnerability information annotation
GCVE-BCP-05-X-01
Whole record AI-generated Human-reviewed GNA-1

Draft vulnerability metadata was generated from a git-format patch using an Ollama-hosted language model. Human validation is required before publication.

ai-computer-assisted:llm-generatedai-computer-assisted:classification
Model Source Identifier
qwen3.8:27b ollama qwen3.8:27b
bcp-05-x-02
Patch-to-vulnerability generation provenance
GCVE-BCP-05-X-02
Generator
patch2vuln.py on 2026-11-16 13:44
Model
qwen3.8:27b
Input
https://github.com/kunai-project/kunai/commit/0ad82911a6b72c81c55507fdabb9baad1ad1ad02.patch 1423cf59bf37…
Confidence
medium
Commit Subject Patch SHA-256
0ad82911a6b7 fix(namespace): verify opened mnt ns fd identity 1423cf59bf37…
Fix summary

The fix eliminates the TOCTOU race by opening the namespace file once to obtain a stable file descriptor, then reading the inode number from that fd via fstat/metadata and comparing it against the expected namespace's inode number. If the inodes do not match, the switcher creation is rejected with an UnexpectedNsInode error and nothing is cached, so the event is simply not enriched. This ensures the cached namespace identity is verified atomically from the opened fd rather than from a separate /proc lookup that could be affected by PID reuse or namespace changes.

Patch summary

In kunai/src/util/namespace.rs, Switcher::new now accepts an additional expected: &N parameter. Instead of calling N::from_pid to resolve the namespace (a separate /proc lookup), it calls N::open to get a stable fd, reads the inode via metadata().ino(), and compares it to expected.inum(). On mismatch it returns NsError::UnexpectedNsInode. A new NsError variant UnexpectedNsInode { cur, exp } is added. In kunai/src/cache.rs, the call site is updated to pass the expected namespace (&ns) to Switcher::new. Three new unit tests are added: one verifying that the cache rejects the host's own namespace when a different namespace is expected, one verifying rejection of a foreign namespace under the wrong key, and one verifying acceptance when the namespace matches.

CVSS rationale

AV:L: exploitation requires local access to create processes and manipulate namespaces. AC:H: requires a specific timing window between event generation and namespace resolution (PID reuse or setns call at the right moment). AT:P: the attacker must actively manipulate the target process (call setns) or arrange PID reuse. PR:L: local access is needed but not necessarily full root; setns requires appropriate capabilities but PID reuse is a normal system event. UI:N: no user interaction required. VC:N: no confidentiality impact. VI:L: integrity impact on the vulnerable component - security monitoring events are incorrectly resolved, producing wrong file paths. VA:N: no availability impact. SC:N/SI:L/SA:N: the security monitoring system (a separate component) produces incorrect integrity data (wrong path resolution) but no confidentiality or availability impact.

Weakness rationale
  • CWE-367 The code performed a /proc/<pid>/ns/mnt lookup to determine the target namespace and then cached it under a different (expected) key. Between the event referencing the PID/namespace and the actual resolution, the PID could be reused or the process could change namespaces via setns/unshare, causing a different namespace to be cached under the wrong key. The fix verifies identity from a single opened fd, eliminating the race window.
  • CWE-20 The original code did not validate that the resolved namespace matched the expected namespace before caching. The fix adds an explicit inode comparison and rejects the operation on mismatch, which is the missing input validation.
Attack pattern rationale
  • CAPEC-110 The vulnerability is a classic TOCTOU race: the attacker exploits the time window between the event referencing a PID in a specific namespace and Kunai resolving that PID's actual namespace. By calling setns on the target process or arranging PID reuse within that window, the attacker causes a different namespace to be cached under the expected key. CAPEC-110 is the closest match. Uncertainty: the exact exploitation timing window is narrow and the patch does not describe a demonstrated exploit, so the mapping is based on the vulnerability class rather than a confirmed attack sequence.
Assumptions to verify
  • The product is identified as Kunai from the repository path kunai-project/kunai; the vendor is not explicitly stated in the patch metadata and is recorded as unknown.
  • No specific affected or fixed version numbers are provided in the patch; versions are recorded as unspecified.
  • The CVSS PR:L assumes the attacker has local access with sufficient privileges to call setns or arrange PID reuse, but not necessarily full root. If CAP_SYS_ADMIN is strictly required, PR could be H.
  • The CVSS AC:H reflects the narrow timing window required for the race condition; if PID reuse is considered a common enough event to lower the complexity, AC could be L.
  • The CAPEC-110 mapping is based on the vulnerability class (TOCTOU race) rather than a demonstrated exploit; the patch does not include a proof-of-concept, so the exact attack sequence is inferred from the commit message description.
  • The security impact is assessed as integrity-only (incorrect event resolution); the patch does not evidence any confidentiality or availability impact, but downstream effects on security operations are not fully characterized.
  • The commit date is 2026-11-10; no CVE or advisory identifier is present in the patch metadata.
Model comparison

Selected qwen3.8:27b by deterministic-consensus-v1
The selected result is closest to model consensus; this heuristic does not establish factual correctness and human review remains required.

Model Score Agreement Confidence Assumptions
qwen3.8:27b 5 11 medium 7
bcp-05-x-03
Vulnerability handling and disclosure timeline
GCVE-BCP-05-X-03
  1. 2026-11-10 08:53 UTC Fix developed Corrective change authored (0ad82911a6b72c81c55507fdabb9baad1ad1ad02): fix(namespace): verify opened mnt ns fd identity https://github.com/kunai-project/kunai/commit/0ad82911a6b72c81c55507fdabb9baad1ad1ad02.patch
  2. 2026-11-16 13:44 UTC Fix available Patch retrieved from the supplied URL; retrieval time is used as the default availability time. https://github.com/kunai-project/kunai/commit/0ad82911a6b72c81c55507fdabb9baad1ad1ad02.patch
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2026-129919",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-11-16T14:50:29.869444Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-11-16T14:50:44.583Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "cpes": [
            "cpe:2.3:a:kunai-project:kunai:*:*:*:*:*:*:*:*"
          ],
          "modules": [
            "kunai/src/cache.rs",
            "kunai/src/util/namespace.rs"
          ],
          "product": "Kunai",
          "programFiles": [
            "kunai/src/cache.rs",
            "kunai/src/util/namespace.rs"
          ],
          "repo": "https://github.com/kunai-project/kunai",
          "vendor": "kunai-project",
          "versions": [
            {
              "lessThanOrEqual": "0.6.2",
              "status": "affected",
              "version": "0",
              "versionType": "semver"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:a:kunai-project:kunai:*:*:*:*:*:*:*:*",
                  "versionEndIncluding": "0.6.2",
                  "versionStartIncluding": "0",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "type": "remediation developer",
          "value": "qjerome"
        },
        {
          "lang": "en",
          "type": "finder",
          "value": "Wachizungu"
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "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/\u003cpid\u003e/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.\n\nAn 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\u0027s own namespace) would be cached under the container\u0027s namespace key.\n\nThe 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.\n\nThe vulnerability requires local access to the system and a specific timing window between event generation and namespace resolution. No remote attack vector or user interaction is required."
        }
      ],
      "impacts": [
        {
          "capecId": "CAPEC-110",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-110 Exploiting Race Conditions"
            }
          ]
        }
      ],
      "metrics": [
        {
          "cvssV4_0": {
            "Automatable": "NOT_DEFINED",
            "Recovery": "NOT_DEFINED",
            "Safety": "NOT_DEFINED",
            "attackComplexity": "HIGH",
            "attackRequirements": "PRESENT",
            "attackVector": "LOCAL",
            "baseScore": 2,
            "baseSeverity": "LOW",
            "privilegesRequired": "LOW",
            "providerUrgency": "NOT_DEFINED",
            "subAvailabilityImpact": "NONE",
            "subConfidentialityImpact": "NONE",
            "subIntegrityImpact": "LOW",
            "userInteraction": "NONE",
            "valueDensity": "NOT_DEFINED",
            "vectorString": "CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N",
            "version": "4.0",
            "vulnAvailabilityImpact": "NONE",
            "vulnConfidentialityImpact": "NONE",
            "vulnIntegrityImpact": "LOW",
            "vulnerabilityResponseEffort": "NOT_DEFINED"
          },
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        },
        {
          "format": "SSVC",
          "other": {
            "content": {
              "options": [
                {
                  "Exploitation": "none"
                },
                {
                  "Automatable": "no"
                },
                {
                  "Technical Impact": "partial"
                }
              ],
              "role": "Supplier",
              "timestamp": "2026-11-16T13:44:48Z",
              "version": "2.0.3"
            },
            "type": "SSVC"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-367",
              "description": "CWE-367 TOCTOU Race Condition",
              "lang": "en",
              "type": "CWE"
            }
          ]
        },
        {
          "descriptions": [
            {
              "cweId": "CWE-20",
              "description": "CWE-20 Improper Input Validation",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-11-16T13:49:48.276Z",
        "orgId": "5a6e4751-2f3f-4070-9419-94fb35b644e8",
        "shortName": "CIRCL"
      },
      "references": [
        {
          "name": "Security patch",
          "tags": [
            "patch"
          ],
          "url": "https://github.com/kunai-project/kunai/commit/0ad82911a6b72c81c55507fdabb9baad1ad1ad02"
        }
      ],
      "solutions": [
        {
          "lang": "en",
          "value": "The fix eliminates the TOCTOU race by opening the namespace file once to obtain a stable file descriptor, then reading the inode number from that fd via fstat/metadata and comparing it against the expected namespace\u0027s inode number. If the inodes do not match, the switcher creation is rejected with an UnexpectedNsInode error and nothing is cached, so the event is simply not enriched. This ensures the cached namespace identity is verified atomically from the opened fd rather than from a separate /proc lookup that could be affected by PID reuse or namespace changes."
        }
      ],
      "title": "Kunai Mount Namespace Cache TOCTOU Allows Incorrect Event Resolution Against Host Files",
      "x_gcve": [
        {
          "extensions": {
            "bcp-05-x-01": {
              "ai_annotations": [
                {
                  "ai_level": "generated",
                  "description": "Draft vulnerability metadata was generated from a git-format patch using an Ollama-hosted language model. Human validation is required before publication.",
                  "gna_source": 1,
                  "models": [
                    {
                      "gna_source": 1,
                      "identifier": "qwen3.8:27b",
                      "name": "qwen3.8:27b",
                      "source": "ollama"
                    }
                  ],
                  "review_status": "full",
                  "scope": "record",
                  "tags": [
                    "ai-computer-assisted:llm-generated",
                    "ai-computer-assisted:classification"
                  ]
                }
              ]
            },
            "bcp-05-x-02": {
              "x_patch2vuln": {
                "assumptions": [
                  "The product is identified as Kunai from the repository path kunai-project/kunai; the vendor is not explicitly stated in the patch metadata and is recorded as unknown.",
                  "No specific affected or fixed version numbers are provided in the patch; versions are recorded as unspecified.",
                  "The CVSS PR:L assumes the attacker has local access with sufficient privileges to call setns or arrange PID reuse, but not necessarily full root. If CAP_SYS_ADMIN is strictly required, PR could be H.",
                  "The CVSS AC:H reflects the narrow timing window required for the race condition; if PID reuse is considered a common enough event to lower the complexity, AC could be L.",
                  "The CAPEC-110 mapping is based on the vulnerability class (TOCTOU race) rather than a demonstrated exploit; the patch does not include a proof-of-concept, so the exact attack sequence is inferred from the commit message description.",
                  "The security impact is assessed as integrity-only (incorrect event resolution); the patch does not evidence any confidentiality or availability impact, but downstream effects on security operations are not fully characterized.",
                  "The commit date is 2026-11-10; no CVE or advisory identifier is present in the patch metadata."
                ],
                "capecRationale": [
                  {
                    "capecId": "CAPEC-110",
                    "rationale": "The vulnerability is a classic TOCTOU race: the attacker exploits the time window between the event referencing a PID in a specific namespace and Kunai resolving that PID\u0027s actual namespace. By calling setns on the target process or arranging PID reuse within that window, the attacker causes a different namespace to be cached under the expected key. CAPEC-110 is the closest match. Uncertainty: the exact exploitation timing window is narrow and the patch does not describe a demonstrated exploit, so the mapping is based on the vulnerability class rather than a confirmed attack sequence."
                  }
                ],
                "commit": "0ad82911a6b72c81c55507fdabb9baad1ad1ad02",
                "confidence": "medium",
                "credits": [
                  {
                    "lang": "en",
                    "type": "remediation developer",
                    "value": "qjerome"
                  }
                ],
                "cvssRationale": "AV:L: exploitation requires local access to create processes and manipulate namespaces. AC:H: requires a specific timing window between event generation and namespace resolution (PID reuse or setns call at the right moment). AT:P: the attacker must actively manipulate the target process (call setns) or arrange PID reuse. PR:L: local access is needed but not necessarily full root; setns requires appropriate capabilities but PID reuse is a normal system event. UI:N: no user interaction required. VC:N: no confidentiality impact. VI:L: integrity impact on the vulnerable component - security monitoring events are incorrectly resolved, producing wrong file paths. VA:N: no availability impact. SC:N/SI:L/SA:N: the security monitoring system (a separate component) produces incorrect integrity data (wrong path resolution) but no confidentiality or availability impact.",
                "draft": false,
                "fixSummary": "The fix eliminates the TOCTOU race by opening the namespace file once to obtain a stable file descriptor, then reading the inode number from that fd via fstat/metadata and comparing it against the expected namespace\u0027s inode number. If the inodes do not match, the switcher creation is rejected with an UnexpectedNsInode error and nothing is cached, so the event is simply not enriched. This ensures the cached namespace identity is verified atomically from the opened fd rather than from a separate /proc lookup that could be affected by PID reuse or namespace changes.",
                "generatedAt": "2026-11-16T13:44:48.393000Z",
                "generator": "patch2vuln.py",
                "model": "qwen3.8:27b",
                "modelComparison": {
                  "potentialErrors": [],
                  "rankings": [
                    {
                      "agreementScore": 11,
                      "assumptionCount": 7,
                      "confidence": "medium",
                      "model": "qwen3.8:27b",
                      "score": 5
                    }
                  ],
                  "selectedModel": "qwen3.8:27b",
                  "selectionMethod": "deterministic-consensus-v1",
                  "selectionNotice": "The selected result is closest to model consensus; this heuristic does not establish factual correctness and human review remains required."
                },
                "patchSha256": "1423cf59bf3736f481f429f0e482e25af19ec53348a90d9ce265b254ba198576",
                "patchSummary": "In kunai/src/util/namespace.rs, Switcher::new now accepts an additional expected: \u0026N parameter. Instead of calling N::from_pid to resolve the namespace (a separate /proc lookup), it calls N::open to get a stable fd, reads the inode via metadata().ino(), and compares it to expected.inum(). On mismatch it returns NsError::UnexpectedNsInode. A new NsError variant UnexpectedNsInode { cur, exp } is added. In kunai/src/cache.rs, the call site is updated to pass the expected namespace (\u0026ns) to Switcher::new. Three new unit tests are added: one verifying that the cache rejects the host\u0027s own namespace when a different namespace is expected, one verifying rejection of a foreign namespace under the wrong key, and one verifying acceptance when the namespace matches.",
                "patchTruncated": false,
                "patches": [
                  {
                    "commit": "0ad82911a6b72c81c55507fdabb9baad1ad1ad02",
                    "date": "Tue, 10 Nov 2026 09:53:52 +0100",
                    "patchSha256": "1423cf59bf3736f481f429f0e482e25af19ec53348a90d9ce265b254ba198576",
                    "retrievedAt": "2026-11-16T13:44:10.582832Z",
                    "source": "https://github.com/kunai-project/kunai/commit/0ad82911a6b72c81c55507fdabb9baad1ad1ad02.patch",
                    "sourceUrl": "https://github.com/kunai-project/kunai/commit/0ad82911a6b72c81c55507fdabb9baad1ad1ad02.patch",
                    "subject": "fix(namespace): verify opened mnt ns fd identity"
                  }
                ],
                "source": "https://github.com/kunai-project/kunai/commit/0ad82911a6b72c81c55507fdabb9baad1ad1ad02.patch",
                "ssvc": {
                  "options": [
                    {
                      "Exploitation": "none"
                    },
                    {
                      "Automatable": "no"
                    },
                    {
                      "Technical Impact": "partial"
                    }
                  ],
                  "role": "Supplier",
                  "timestamp": "2026-11-16T13:44:48Z",
                  "version": "2.0.3"
                },
                "subject": "fix(namespace): verify opened mnt ns fd identity",
                "weaknessRationale": [
                  {
                    "cweId": "CWE-367",
                    "rationale": "The code performed a /proc/\u003cpid\u003e/ns/mnt lookup to determine the target namespace and then cached it under a different (expected) key. Between the event referencing the PID/namespace and the actual resolution, the PID could be reused or the process could change namespaces via setns/unshare, causing a different namespace to be cached under the wrong key. The fix verifies identity from a single opened fd, eliminating the race window."
                  },
                  {
                    "cweId": "CWE-20",
                    "rationale": "The original code did not validate that the resolved namespace matched the expected namespace before caching. The fix adds an explicit inode comparison and rejects the operation on mismatch, which is the missing input validation."
                  }
                ]
              }
            },
            "bcp-05-x-03": {
              "x_timeline": {
                "events": [
                  {
                    "description": "Corrective change authored (0ad82911a6b72c81c55507fdabb9baad1ad1ad02): fix(namespace): verify opened mnt ns fd identity",
                    "id": "evt-fix-developed-1",
                    "references": [
                      "https://github.com/kunai-project/kunai/commit/0ad82911a6b72c81c55507fdabb9baad1ad1ad02.patch"
                    ],
                    "timestamp": "2026-11-10T08:53:52Z",
                    "type": "fix-developed"
                  },
                  {
                    "description": "Patch retrieved from the supplied URL; retrieval time is used as the default availability time.",
                    "id": "evt-fix-available-1",
                    "references": [
                      "https://github.com/kunai-project/kunai/commit/0ad82911a6b72c81c55507fdabb9baad1ad1ad02.patch"
                    ],
                    "timestamp": "2026-11-16T13:44:10.582832Z",
                    "type": "fix-available"
                  }
                ]
              }
            }
          },
          "recordType": "advisory",
          "vulnId": "gcve-1-2026-20338"
        }
      ]
    }
  },
  "cveMetadata": {
    "assignerOrgId": "5a6e4751-2f3f-4070-9419-94fb35b644e8",
    "assignerShortName": "CIRCL",
    "cveId": "CVE-2026-129919",
    "datePublished": "2026-11-16T13:49:48.276Z",
    "dateReserved": "2026-11-16T13:49:40.560Z",
    "dateUpdated": "2026-11-16T14:50:44.583Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "cpes": [
                  "cpe:2.3:a:kunai-project:kunai:*:*:*:*:*:*:*:*"
                ],
                "modules": [
                  "kunai/src/cache.rs",
                  "kunai/src/util/namespace.rs"
                ],
                "product": "Kunai",
                "programFiles": [
                  "kunai/src/cache.rs",
                  "kunai/src/util/namespace.rs"
                ],
                "repo": "https://github.com/kunai-project/kunai",
                "vendor": "kunai-project",
                "versions": [
                  {
                    "lessThanOrEqual": "0.6.2",
                    "status": "affected",
                    "version": "0",
                    "versionType": "semver"
                  }
                ]
              }
            ],
            "source": "5a6e4751-2f3f-4070-9419-94fb35b644e8"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "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/\u003cpid\u003e/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.\n\nAn 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\u0027s own namespace) would be cached under the container\u0027s namespace key.\n\nThe 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.\n\nThe vulnerability requires local access to the system and a specific timing window between event generation and namespace resolution. No remote attack vector or user interaction is required."
          }
        ],
        "id": "CVE-2026-129919",
        "lastModified": "2026-11-16T15:17:28.427",
        "metrics": {
          "cvssMetricV40": [
            {
              "cvssData": {
                "Automatable": "NOT_DEFINED",
                "Recovery": "NOT_DEFINED",
                "Safety": "NOT_DEFINED",
                "attackComplexity": "HIGH",
                "attackRequirements": "PRESENT",
                "attackVector": "LOCAL",
                "availabilityRequirement": "NOT_DEFINED",
                "baseScore": 2.0,
                "baseSeverity": "LOW",
                "confidentialityRequirement": "NOT_DEFINED",
                "exploitMaturity": "NOT_DEFINED",
                "integrityRequirement": "NOT_DEFINED",
                "modifiedAttackComplexity": "NOT_DEFINED",
                "modifiedAttackRequirements": "NOT_DEFINED",
                "modifiedAttackVector": "NOT_DEFINED",
                "modifiedPrivilegesRequired": "NOT_DEFINED",
                "modifiedSubAvailabilityImpact": "NOT_DEFINED",
                "modifiedSubConfidentialityImpact": "NOT_DEFINED",
                "modifiedSubIntegrityImpact": "NOT_DEFINED",
                "modifiedUserInteraction": "NOT_DEFINED",
                "modifiedVulnAvailabilityImpact": "NOT_DEFINED",
                "modifiedVulnConfidentialityImpact": "NOT_DEFINED",
                "modifiedVulnIntegrityImpact": "NOT_DEFINED",
                "privilegesRequired": "LOW",
                "providerUrgency": "NOT_DEFINED",
                "subAvailabilityImpact": "NONE",
                "subConfidentialityImpact": "NONE",
                "subIntegrityImpact": "LOW",
                "userInteraction": "NONE",
                "valueDensity": "NOT_DEFINED",
                "vectorString": "CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
                "version": "4.0",
                "vulnAvailabilityImpact": "NONE",
                "vulnConfidentialityImpact": "NONE",
                "vulnIntegrityImpact": "LOW",
                "vulnerabilityResponseEffort": "NOT_DEFINED"
              },
              "source": "5a6e4751-2f3f-4070-9419-94fb35b644e8",
              "type": "Secondary"
            }
          ],
          "ssvcV203": [
            {
              "source": "5a6e4751-2f3f-4070-9419-94fb35b644e8",
              "ssvcData": {
                "options": [
                  {
                    "exploitation": "none"
                  },
                  {
                    "automatable": "no"
                  },
                  {
                    "technicalImpact": "partial"
                  }
                ],
                "role": "Supplier",
                "timestamp": "2026-11-16T13:44:48Z",
                "version": "2.0.3"
              }
            },
            {
              "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "ssvcData": {
                "id": "CVE-2026-129919",
                "options": [
                  {
                    "exploitation": "none"
                  },
                  {
                    "automatable": "no"
                  },
                  {
                    "technicalImpact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-11-16T14:50:29.869444Z",
                "version": "2.0.3"
              }
            }
          ]
        },
        "published": "2026-11-16T14:17:07.353",
        "references": [
          {
            "source": "5a6e4751-2f3f-4070-9419-94fb35b644e8",
            "url": "https://github.com/kunai-project/kunai/commit/0ad82911a6b72c81c55507fdabb9baad1ad1ad02"
          }
        ],
        "sourceIdentifier": "5a6e4751-2f3f-4070-9419-94fb35b644e8",
        "vulnStatus": "Received",
        "weaknesses": [
          {
            "description": [
              {
                "lang": "en",
                "value": "CWE-20"
              },
              {
                "lang": "en",
                "value": "CWE-367"
              }
            ],
            "source": "5a6e4751-2f3f-4070-9419-94fb35b644e8",
            "type": "Secondary"
          }
        ]
      }
    },
    "vulnrichment": {
      "containers": {
        "adp": [
          {
            "metrics": [
              {
                "other": {
                  "content": {
                    "id": "CVE-2026-129919",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2026-11-16T14:50:29.869444Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2026-11-16T14:50:40.935Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "cpes": [
                "cpe:2.3:a:kunai-project:kunai:*:*:*:*:*:*:*:*"
              ],
              "modules": [
                "kunai/src/cache.rs",
                "kunai/src/util/namespace.rs"
              ],
              "product": "Kunai",
              "programFiles": [
                "kunai/src/cache.rs",
                "kunai/src/util/namespace.rs"
              ],
              "repo": "https://github.com/kunai-project/kunai",
              "vendor": "kunai-project",
              "versions": [
                {
                  "lessThanOrEqual": "0.6.2",
                  "status": "affected",
                  "version": "0",
                  "versionType": "semver"
                }
              ]
            }
          ],
          "cpeApplicability": [
            {
              "nodes": [
                {
                  "cpeMatch": [
                    {
                      "criteria": "cpe:2.3:a:kunai-project:kunai:*:*:*:*:*:*:*:*",
                      "versionEndIncluding": "0.6.2",
                      "versionStartIncluding": "0",
                      "vulnerable": true
                    }
                  ],
                  "negate": false,
                  "operator": "OR"
                }
              ]
            }
          ],
          "credits": [
            {
              "lang": "en",
              "type": "remediation developer",
              "value": "qjerome"
            },
            {
              "lang": "en",
              "type": "finder",
              "value": "Wachizungu"
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "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/\u003cpid\u003e/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.\n\nAn 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\u0027s own namespace) would be cached under the container\u0027s namespace key.\n\nThe 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.\n\nThe vulnerability requires local access to the system and a specific timing window between event generation and namespace resolution. No remote attack vector or user interaction is required."
            }
          ],
          "impacts": [
            {
              "capecId": "CAPEC-110",
              "descriptions": [
                {
                  "lang": "en",
                  "value": "CAPEC-110 Exploiting Race Conditions"
                }
              ]
            }
          ],
          "metrics": [
            {
              "cvssV4_0": {
                "Automatable": "NOT_DEFINED",
                "Recovery": "NOT_DEFINED",
                "Safety": "NOT_DEFINED",
                "attackComplexity": "HIGH",
                "attackRequirements": "PRESENT",
                "attackVector": "LOCAL",
                "baseScore": 2,
                "baseSeverity": "LOW",
                "privilegesRequired": "LOW",
                "providerUrgency": "NOT_DEFINED",
                "subAvailabilityImpact": "NONE",
                "subConfidentialityImpact": "NONE",
                "subIntegrityImpact": "LOW",
                "userInteraction": "NONE",
                "valueDensity": "NOT_DEFINED",
                "vectorString": "CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N",
                "version": "4.0",
                "vulnAvailabilityImpact": "NONE",
                "vulnConfidentialityImpact": "NONE",
                "vulnIntegrityImpact": "LOW",
                "vulnerabilityResponseEffort": "NOT_DEFINED"
              },
              "format": "CVSS",
              "scenarios": [
                {
                  "lang": "en",
                  "value": "GENERAL"
                }
              ]
            },
            {
              "format": "SSVC",
              "other": {
                "content": {
                  "options": [
                    {
                      "Exploitation": "none"
                    },
                    {
                      "Automatable": "no"
                    },
                    {
                      "Technical Impact": "partial"
                    }
                  ],
                  "role": "Supplier",
                  "timestamp": "2026-11-16T13:44:48Z",
                  "version": "2.0.3"
                },
                "type": "SSVC"
              },
              "scenarios": [
                {
                  "lang": "en",
                  "value": "GENERAL"
                }
              ]
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "cweId": "CWE-367",
                  "description": "CWE-367 TOCTOU Race Condition",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            },
            {
              "descriptions": [
                {
                  "cweId": "CWE-20",
                  "description": "CWE-20 Improper Input Validation",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2026-11-16T13:49:48.276Z",
            "orgId": "5a6e4751-2f3f-4070-9419-94fb35b644e8",
            "shortName": "CIRCL"
          },
          "references": [
            {
              "name": "Security patch",
              "tags": [
                "patch"
              ],
              "url": "https://github.com/kunai-project/kunai/commit/0ad82911a6b72c81c55507fdabb9baad1ad1ad02"
            }
          ],
          "solutions": [
            {
              "lang": "en",
              "value": "The fix eliminates the TOCTOU race by opening the namespace file once to obtain a stable file descriptor, then reading the inode number from that fd via fstat/metadata and comparing it against the expected namespace\u0027s inode number. If the inodes do not match, the switcher creation is rejected with an UnexpectedNsInode error and nothing is cached, so the event is simply not enriched. This ensures the cached namespace identity is verified atomically from the opened fd rather than from a separate /proc lookup that could be affected by PID reuse or namespace changes."
            }
          ],
          "title": "Kunai Mount Namespace Cache TOCTOU Allows Incorrect Event Resolution Against Host Files",
          "x_gcve": [
            {
              "extensions": {
                "bcp-05-x-01": {
                  "ai_annotations": [
                    {
                      "ai_level": "generated",
                      "description": "Draft vulnerability metadata was generated from a git-format patch using an Ollama-hosted language model. Human validation is required before publication.",
                      "gna_source": 1,
                      "models": [
                        {
                          "gna_source": 1,
                          "identifier": "qwen3.8:27b",
                          "name": "qwen3.8:27b",
                          "source": "ollama"
                        }
                      ],
                      "review_status": "full",
                      "scope": "record",
                      "tags": [
                        "ai-computer-assisted:llm-generated",
                        "ai-computer-assisted:classification"
                      ]
                    }
                  ]
                },
                "bcp-05-x-02": {
                  "x_patch2vuln": {
                    "assumptions": [
                      "The product is identified as Kunai from the repository path kunai-project/kunai; the vendor is not explicitly stated in the patch metadata and is recorded as unknown.",
                      "No specific affected or fixed version numbers are provided in the patch; versions are recorded as unspecified.",
                      "The CVSS PR:L assumes the attacker has local access with sufficient privileges to call setns or arrange PID reuse, but not necessarily full root. If CAP_SYS_ADMIN is strictly required, PR could be H.",
                      "The CVSS AC:H reflects the narrow timing window required for the race condition; if PID reuse is considered a common enough event to lower the complexity, AC could be L.",
                      "The CAPEC-110 mapping is based on the vulnerability class (TOCTOU race) rather than a demonstrated exploit; the patch does not include a proof-of-concept, so the exact attack sequence is inferred from the commit message description.",
                      "The security impact is assessed as integrity-only (incorrect event resolution); the patch does not evidence any confidentiality or availability impact, but downstream effects on security operations are not fully characterized.",
                      "The commit date is 2026-11-10; no CVE or advisory identifier is present in the patch metadata."
                    ],
                    "capecRationale": [
                      {
                        "capecId": "CAPEC-110",
                        "rationale": "The vulnerability is a classic TOCTOU race: the attacker exploits the time window between the event referencing a PID in a specific namespace and Kunai resolving that PID\u0027s actual namespace. By calling setns on the target process or arranging PID reuse within that window, the attacker causes a different namespace to be cached under the expected key. CAPEC-110 is the closest match. Uncertainty: the exact exploitation timing window is narrow and the patch does not describe a demonstrated exploit, so the mapping is based on the vulnerability class rather than a confirmed attack sequence."
                      }
                    ],
                    "commit": "0ad82911a6b72c81c55507fdabb9baad1ad1ad02",
                    "confidence": "medium",
                    "credits": [
                      {
                        "lang": "en",
                        "type": "remediation developer",
                        "value": "qjerome"
                      }
                    ],
                    "cvssRationale": "AV:L: exploitation requires local access to create processes and manipulate namespaces. AC:H: requires a specific timing window between event generation and namespace resolution (PID reuse or setns call at the right moment). AT:P: the attacker must actively manipulate the target process (call setns) or arrange PID reuse. PR:L: local access is needed but not necessarily full root; setns requires appropriate capabilities but PID reuse is a normal system event. UI:N: no user interaction required. VC:N: no confidentiality impact. VI:L: integrity impact on the vulnerable component - security monitoring events are incorrectly resolved, producing wrong file paths. VA:N: no availability impact. SC:N/SI:L/SA:N: the security monitoring system (a separate component) produces incorrect integrity data (wrong path resolution) but no confidentiality or availability impact.",
                    "draft": false,
                    "fixSummary": "The fix eliminates the TOCTOU race by opening the namespace file once to obtain a stable file descriptor, then reading the inode number from that fd via fstat/metadata and comparing it against the expected namespace\u0027s inode number. If the inodes do not match, the switcher creation is rejected with an UnexpectedNsInode error and nothing is cached, so the event is simply not enriched. This ensures the cached namespace identity is verified atomically from the opened fd rather than from a separate /proc lookup that could be affected by PID reuse or namespace changes.",
                    "generatedAt": "2026-11-16T13:44:48.393000Z",
                    "generator": "patch2vuln.py",
                    "model": "qwen3.8:27b",
                    "modelComparison": {
                      "potentialErrors": [],
                      "rankings": [
                        {
                          "agreementScore": 11,
                          "assumptionCount": 7,
                          "confidence": "medium",
                          "model": "qwen3.8:27b",
                          "score": 5
                        }
                      ],
                      "selectedModel": "qwen3.8:27b",
                      "selectionMethod": "deterministic-consensus-v1",
                      "selectionNotice": "The selected result is closest to model consensus; this heuristic does not establish factual correctness and human review remains required."
                    },
                    "patchSha256": "1423cf59bf3736f481f429f0e482e25af19ec53348a90d9ce265b254ba198576",
                    "patchSummary": "In kunai/src/util/namespace.rs, Switcher::new now accepts an additional expected: \u0026N parameter. Instead of calling N::from_pid to resolve the namespace (a separate /proc lookup), it calls N::open to get a stable fd, reads the inode via metadata().ino(), and compares it to expected.inum(). On mismatch it returns NsError::UnexpectedNsInode. A new NsError variant UnexpectedNsInode { cur, exp } is added. In kunai/src/cache.rs, the call site is updated to pass the expected namespace (\u0026ns) to Switcher::new. Three new unit tests are added: one verifying that the cache rejects the host\u0027s own namespace when a different namespace is expected, one verifying rejection of a foreign namespace under the wrong key, and one verifying acceptance when the namespace matches.",
                    "patchTruncated": false,
                    "patches": [
                      {
                        "commit": "0ad82911a6b72c81c55507fdabb9baad1ad1ad02",
                        "date": "Tue, 10 Nov 2026 09:53:52 +0100",
                        "patchSha256": "1423cf59bf3736f481f429f0e482e25af19ec53348a90d9ce265b254ba198576",
                        "retrievedAt": "2026-11-16T13:44:10.582832Z",
                        "source": "https://github.com/kunai-project/kunai/commit/0ad82911a6b72c81c55507fdabb9baad1ad1ad02.patch",
                        "sourceUrl": "https://github.com/kunai-project/kunai/commit/0ad82911a6b72c81c55507fdabb9baad1ad1ad02.patch",
                        "subject": "fix(namespace): verify opened mnt ns fd identity"
                      }
                    ],
                    "source": "https://github.com/kunai-project/kunai/commit/0ad82911a6b72c81c55507fdabb9baad1ad1ad02.patch",
                    "ssvc": {
                      "options": [
                        {
                          "Exploitation": "none"
                        },
                        {
                          "Automatable": "no"
                        },
                        {
                          "Technical Impact": "partial"
                        }
                      ],
                      "role": "Supplier",
                      "timestamp": "2026-11-16T13:44:48Z",
                      "version": "2.0.3"
                    },
                    "subject": "fix(namespace): verify opened mnt ns fd identity",
                    "weaknessRationale": [
                      {
                        "cweId": "CWE-367",
                        "rationale": "The code performed a /proc/\u003cpid\u003e/ns/mnt lookup to determine the target namespace and then cached it under a different (expected) key. Between the event referencing the PID/namespace and the actual resolution, the PID could be reused or the process could change namespaces via setns/unshare, causing a different namespace to be cached under the wrong key. The fix verifies identity from a single opened fd, eliminating the race window."
                      },
                      {
                        "cweId": "CWE-20",
                        "rationale": "The original code did not validate that the resolved namespace matched the expected namespace before caching. The fix adds an explicit inode comparison and rejects the operation on mismatch, which is the missing input validation."
                      }
                    ]
                  }
                },
                "bcp-05-x-03": {
                  "x_timeline": {
                    "events": [
                      {
                        "description": "Corrective change authored (0ad82911a6b72c81c55507fdabb9baad1ad1ad02): fix(namespace): verify opened mnt ns fd identity",
                        "id": "evt-fix-developed-1",
                        "references": [
                          "https://github.com/kunai-project/kunai/commit/0ad82911a6b72c81c55507fdabb9baad1ad1ad02.patch"
                        ],
                        "timestamp": "2026-11-10T08:53:52Z",
                        "type": "fix-developed"
                      },
                      {
                        "description": "Patch retrieved from the supplied URL; retrieval time is used as the default availability time.",
                        "id": "evt-fix-available-1",
                        "references": [
                          "https://github.com/kunai-project/kunai/commit/0ad82911a6b72c81c55507fdabb9baad1ad1ad02.patch"
                        ],
                        "timestamp": "2026-11-16T13:44:10.582832Z",
                        "type": "fix-available"
                      }
                    ]
                  }
                }
              },
              "recordType": "advisory",
              "vulnId": "gcve-1-2026-20338"
            }
          ]
        }
      },
      "cveMetadata": {
        "assignerOrgId": "5a6e4751-2f3f-4070-9419-94fb35b644e8",
        "assignerShortName": "CIRCL",
        "cveId": "CVE-2026-129919",
        "datePublished": "2026-11-16T13:49:48.276Z",
        "dateReserved": "2026-11-16T13:49:40.560Z",
        "dateUpdated": "2026-11-16T14:50:44.583Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


Solutions

CNA · CIRCL
The fix eliminates the TOCTOU race by opening the namespace file once to obtain a stable file descriptor, then reading the inode number from that fd via fstat/metadata and comparing it against the expected namespace's inode number. If the inodes do not match, the switcher creation is rejected with an UnexpectedNsInode error and nothing is cached, so the event is simply not enriched. This ensures the cached namespace identity is verified atomically from the opened fd rather than from a separate /proc lookup that could be affected by PID reuse or namespace changes.

Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.