# CVE-2026-77751: Path Traversal in MISP Object Template Resolution During STIX Import and Export in misp-stix library

The Markdown version of <https://upatch.dev/cve/CVE-2026-77751>. Last updated 25 Nov 2026.

## At a glance

CVE-2026-77751 is rated High 8.8 (CVSS 4.0, CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/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). It affects misp-stix and was published on 21 Aug 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 0.7%: the estimated chance it is exploited in the next 30 days, as of 24 Nov 2026. The upatch `cve-2026-77751-misp-stix-block` mitigates it, and is vetted (merged into the registry).

A upatch is a signed BPF program that shirudo loads into a running Linux kernel to block the code path this CVE's exploit takes. It holds the line until the fix ships; it does not replace patching.

## The vulnerability

CVE-2026-77751, "Path Traversal in MISP Object Template Resolution During STIX Import and Export in misp-stix library", was published on 21 August 2026. During STIX 2 import (`STIX2CustomObjectConverter._parse_custom_object`) and MISP-to-STIX 2 export (`MISPtoSTIX2Parser.parse_misp_event`, `parse_misp_object`, `parse_misp_objects`), `misp-stix` passes untrusted MISP object template names (`x_misp_name` or `name`) to PyMISP's object-template resolution, which joins the configured MISP object-template directory (`data/misp-objects/objects`), the object name, and `definition.json`. An object name containing path separators or `..` segments escapes the `objects/<template>/` directory and opens a `definition.json` file elsewhere on the filesystem, copying its fields onto the converted object.

### Official description

A path traversal vulnerability existed in the handling of MISP object template names during STIX 2 import and MISP-to-STIX 2 export.

MISP object names are passed to PyMISP's object-template resolution mechanism, which constructs a filesystem path by joining the configured MISP object-template directory, the object name, and definition.json. An object name originating from untrusted STIX or MISP content was not sufficiently restricted before being used in this filesystem path.

An attacker able to supply a crafted object name containing path separators or traversal sequences such as ../ could therefore cause template resolution to escape the expected template directory and attempt to load a definition.json file from another location accessible to the process.

During STIX 2 import, an attacker-controlled x_misp_name from a custom STIX object could directly reach this template-resolution mechanism.

The issue could also become persistent. A malicious object name stored in a MISP event could later be processed again during STIX 2 export. Consequently, content originally introduced in one security context could trigger filesystem access later when the event is exported by a process operating with different or greater privileges.

If a suitable definition.json file exists outside the intended template directory, its contents may be interpreted as a MISP object template and fields from that file copied into the converted object. This can result in unintended disclosure of locally accessible data represented by the template file and modification of the resulting object's metadata or semantics.

The patches introduce strict validation of object-template names. Valid names are restricted to a single path component containing letters, digits, hyphens, or underscores. Names that do not meet these requirements are replaced with the generic unknown-template name before reaching PyMISP template resolution. The original rejected name is preserved in the object's comment and a warning is generated, preventing traversal while retaining the source information.

## What the upatch does

The `lsm/file_open` program returns `-EPERM` when a process whose executable name starts with `python` opens a file named `definition.json` whose grandparent directory (`d_parent->d_parent`) is not named `objects`. In the kernel VFS, `..` components are resolved during path walk before `security_file_open` runs, so `file->f_path.dentry` points to the target `definition.json` at its real location. Built-in MISP object templates live at `data/misp-objects/objects/<template>/definition.json`, where `d_parent->d_parent` is `objects`. Any traversal that escapes `objects/<template>/` resolves to a `definition.json` whose grandparent is not `objects` and is refused. A refusal from an earlier BPF LSM program on the same hook is passed on. The `refused` per-CPU array counts refusals at key 0.

The policy: [`cve-2026-77751-misp-stix-block.bpf.c`](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-77751), 97 lines of BPF C attached at `lsm/file_open`, licensed GPL-2.0 OR BSD-2-Clause.

## Side effects

- Any attempt by a Python process to open a file named `definition.json` whose grandparent directory is not named `objects` fails with `EPERM`.
- In `misp-stix` 2026.7.8, a STIX 2 import or MISP-to-STIX 2 export whose object name traverses to an external `definition.json` fails with `PermissionError` instead of loading the external file.
- Normal MISP object templates under `objects/<template>/definition.json` open normally.
- Non-Python processes are untouched.

## Preemption model and cost

The program keeps no state beyond the per-CPU refusal counter, which it updates with an atomic add, so it is correct under every preemption model, including preemptible RCU and `PREEMPT_RT`. On every `file_open` for a file whose name is not 15 bytes long, a run costs one length check on `dentry->d_name.len`. Only files named `definition.json` proceed to the grandparent and executable checks.

## Affected versions

| Package     | Affected                     | Fixed in |
| ----------- | ---------------------------- | -------- |
| `misp-stix` | up to and including 2026.7.8 | 2026.9.8 |

Affected kernels: all kernels with BPF LSM support.

## How it was tested

On misp-stix 2026.7.8, the loaded upatch refused opening a definition.json outside pymisp's objects/\<template>/ directory with EPERM when exporting a MISP event whose object name used .. traversal, while normal template resolution kept working.

- **Tested:** 25 Nov 2026
- **Target:** misp-stix 2026.7.8 on Python 3.12, listening on 127.0.0.1
- **Kernel:** 7.4-shirudo-ci-20261123
- **Architecture:** x86_64
- **Machine:** shirudo test VM

### Results

| State           | Traversal object name loads outside definition.json | Normal file object template resolution |
| --------------- | --------------------------------------------------- | -------------------------------------- |
| Before loading  | yes                                                 | yes                                    |
| Upatch loaded   | no (EPERM)                                          | yes                                    |
| After unloading | yes                                                 | yes                                    |

## How to apply

Build the upatch from source, sign it with your own shirudo key, and publish it to your own OCI registry. Machines that follow your upatch tree load it within about a minute.

Build and sign:

```sh
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-77751
```

Publish and roll out:

```sh
shirudo bpm push build/packages/cve-2026-77751-1.0.0.bee oci://<registry>/<namespace>/cve-2026-77751 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-77751-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>
```

## Review

- Contributors: romanlab.
- Reviewers: none recorded yet.

## Sources and links

- [CVE-2026-77751 record (CVE API)](https://cveawg.mitre.org/api/cve/CVE-2026-77751)
- [Fix commit a8b6808d0956](https://github.com/MISP/misp-stix/commit/a8b6808d0956b5e0d85be06a8f21004eae104a4c)
- [Fix commit a0f54070baad](https://github.com/MISP/misp-stix/commit/a0f54070baad3caa3cb52b70c1eb007d2d2b6eec)
- [misp-stix 2026.7.8 on PyPI](https://pypi.org/project/misp-stix/2026.7.8/)

### Links

- [CVE-2026-77751 on upatch.dev](https://upatch.dev/cve/CVE-2026-77751) (this page, as HTML)
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-77751)
- [CVE.org](https://www.cve.org/CVERecord?id=CVE-2026-77751)
- [CWE-22](https://cwe.mitre.org/data/definitions/22.html)
- Upatch source: [upatches/cve-2026-77751](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-77751)

### More references from NVD (2)

- [github.com](https://github.com/MISP/misp-stix/commit/a0f54070)
- [github.com](https://github.com/MISP/misp-stix/commit/a8b6808d)
