Bug #5459
closed
system_advanced_sysctl.php lacking input validation, output sanitation
Added by Anonymous about 9 years ago.
Updated about 9 years ago.
Description
system_advanced_sysctl.php has no input validation (in 2.2.x either). We should be safe to limit Tunable and Value fields to alphanumeric plus - . and _
Tunable and Value should both be required fields. No restrictions on description necessary.
It's also XSS-able, where 2.2.x isn't. For instance, throw
'><script>alert("hi");</script>
into any of the fields.
- Status changed from Assigned to Feedback
- Assignee changed from Anonymous to Chris Buechler
Inputs validated
Error messages provided
htmlspecialchars() protection added where required
- Status changed from Feedback to Confirmed
- Assignee changed from Chris Buechler to Anonymous
- Priority changed from High to Normal
The XSS is fixed, thanks! It's a bit overzealous on the htmlentities somewhere it appears. For instance, save the
'><script>alert("hi");</script>
as your description, and your config ends up with:
<descr><![CDATA['&gt;&lt;script&gt;alert(&am
p;quot;hi&quot;);&lt;/script&gt;]]></descr>
Then you get exactly that upon editing the entry. That'll mess up a variety of usable descriptions.
- Status changed from Confirmed to Feedback
- Assignee changed from Anonymous to Chris Buechler
Kinder, gentler version now saves: "'>alert("hi");" by using strip_tags rather than htmlspecialchars
- Status changed from Feedback to Resolved
Also available in: Atom
PDF