CVE-2026-77751: Path Traversal in MISP Object Template Resolution During STIX Import and Export in misp-stix library
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 xmispname 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Ensure MISP object template names used to construct the filesystem path (template_dir + object name + definition.json) are strictly validated so the name matches a single path component of only letters, digits, hyphens, or underscores; otherwise replace with the generic unknown-template name before reaching template resolution.
PyMISP / misp-stix (MISP object-template resolution) object-template name validation = restrict to a single path component containing only letters, digits, hyphens, or underscores (reject any name with path separators or traversal sequences such as ../)
Event History
Frequently Asked Questions
Which workflows are exposed to attacker-controlled input?
STIX 2 imports are exposed when a custom STIX object supplies an attacker-controlled x_misp_name. MISP-to-STIX 2 exports are also exposed if an event contains a malicious object name that was previously stored in MISP.
What does an attacker need to exploit the issue?
The attacker needs to supply an object name containing path separators or traversal sequences such as ../. The resulting path must resolve to a location containing a definition.json file that is accessible to the process performing the import or export.
Can the malicious input remain dangerous after it is first received?
Yes. A malicious object name introduced into a MISP event can persist and later trigger filesystem path resolution when that event is exported to STIX 2, potentially in a different security context.