CVE-2026-8080
Description
Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in misp allows Stored XSS.
This issue affects MISP before 2.5.37.
A stored cross-site scripting vulnerability exists in the template element attribute handling logic. The application accepted arbitrary values for the TemplateElementAttribute type and category fields without validating them against the known MISP attribute type and category definitions. An attacker with permission to create or modify template element attributes could store a crafted type value.
This affects the old templating (not more accessible in 2.5.37) engine from MISP which will be removed in 2.5.38
Affected products
1Patches
162824e5ca005fix: [security] stored xss in template element attribute type. reported by Bjørn Helseth (TV 2 Norway)
2 files changed · +16 −2
app/Model/TemplateElementAttribute.php+14 −0 modified@@ -2,6 +2,9 @@ App::uses('AppModel', 'Model'); +/** + * @property MispAttribute $Attribute + */ class TemplateElementAttribute extends AppModel { public $actsAs = array('Containable'); @@ -40,8 +43,19 @@ class TemplateElementAttribute extends AppModel ) ), ); + public function beforeValidate($options = array()) { + $MispAttribute = ClassRegistry::init('MispAttribute'); + + if (isset($this->data['TemplateElementAttribute']['type']) && !array_key_exists($this->data['TemplateElementAttribute']['type'], $MispAttribute->typeDefinitions)) { + $this->invalidate('type', 'Invalid type selected.'); + } + + if (isset($this->data['TemplateElementAttribute']['category']) && !array_key_exists($this->data['TemplateElementAttribute']['category'], $MispAttribute->categoryDefinitions)) { + $this->invalidate('category', 'Invalid category selected.'); + } + parent::beforeValidate(); }
app/View/TemplateElements/ajax/template_element_edit_attribute.ctp+2 −2 modified@@ -103,8 +103,8 @@ var typeGroupCategoryMapping = <?php echo json_encode($typeGroupCategoryMapping); ?>; var complexTypes = <?php echo json_encode($validTypeGroups); ?>; var currentTypes = new Array(); - if (<?php echo ($initialValues['complex'] == true ? 1 : 0); ?> == 1) { - currentTypes = complexTypes["<?php echo $initialValues['type']; ?>"]['types']; + if (<?php echo $initialValues['complex'] ? 'true' : 'false'; ?>) { + currentTypes = complexTypes[<?php echo json_encode($initialValues['type']); ?>]['types']; } var fieldsArray = new Array('TemplateElementAttributeName', 'TemplateElementAttributeDescription', 'TemplateElementAttributeCategory', 'TemplateElementAttributeToIds', 'TemplateElementAttributeMandatory', 'TemplateElementAttributeBatch', 'TemplateElementAttributeType', 'TemplateElementAttributeComplex');
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
1News mentions
0No linked articles in our index yet.