Summary
slowlog.php:204 reflects the drp_action POST parameter into an HTML attribute without escaping. An authenticated user can craft a POST request that injects JavaScript into the action confirmation page.
Details
| Field |
Value |
| File |
slowlog.php |
| Line |
204 |
| Auth required |
Yes — authenticated Cacti user |
| CWE |
CWE-79 |
// Before
echo "<input type='hidden' name='drp_action' value='" . $_POST['drp_action'] . "'>";
// After
echo "<input type='hidden' name='drp_action' value='" . html_escape(get_filter_request_var('drp_action')) . "'>";
Fix applied in branch security/slowlog-escape-drp-action.
Acceptance criteria
Summary
slowlog.php:204reflects thedrp_actionPOST parameter into an HTML attribute without escaping. An authenticated user can craft a POST request that injects JavaScript into the action confirmation page.Details
Fix applied in branch
security/slowlog-escape-drp-action.Acceptance criteria
html_escape()applied todrp_actionbefore output at line 204get_filter_request_var()used instead of raw$_POSTaccesstests/Security/SlowlogXssTest.php