From 495c4ee93ce0ef1c74fea6731ae08962c4e2b384 Mon Sep 17 00:00:00 2001 From: iglocska Date: Sun, 20 Feb 2022 12:07:06 +0100 Subject: [PATCH] fix: [security] XSS in the generic action template - a previously assumed internal url can have user input appended via the MISP local tool connector - requires a compromised connected MISP instance where a malicious administrator modifies the UUIDs of cerebrate relevant objects to JS payloads - as reported by Dawid Czarcnecki of Zigrin Security --- templates/element/genericElements/IndexTable/Fields/actions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/element/genericElements/IndexTable/Fields/actions.php b/templates/element/genericElements/IndexTable/Fields/actions.php index c280aad..8a215c4 100644 --- a/templates/element/genericElements/IndexTable/Fields/actions.php +++ b/templates/element/genericElements/IndexTable/Fields/actions.php @@ -98,7 +98,7 @@ ); } $reload_url = !empty($action['reload_url']) ? $action['reload_url'] : $this->Url->build(['action' => 'index']); - $action['onclick'] = sprintf('UI.submissionModalForIndex(\'%s\', \'%s\', \'%s\')', $modal_url, $reload_url, $tableRandomValue); + $action['onclick'] = sprintf('UI.submissionModalForIndex(\'%s\', \'%s\', \'%s\')', h($modal_url), h($reload_url), h($tableRandomValue)); } echo sprintf( ' ',