Project

General

Profile

Actions

Bug #16114

closed

Potential XSS in Firewall Schedules

Added by Jim Pingle about 2 months ago. Updated 4 days ago.

Status:
Resolved
Priority:
Very High
Assignee:
Category:
Rules / NAT
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
25.03
Release Notes:
Default
Affected Version:
Affected Architecture:

Description

The page at firewall_schedule_edit.php does not perform sufficient validation on the schedule values submitted by users. This value is sent back to the user on firewall_schedule.php without encoding, which is a potential XSS vector. Furthermore, the value may also cause a PHP error on firewall_schedule_edit.php which prevents further edits from being made to schedules.

Creating a new entry with the following data reproduces the problem condition:

{
    "name": "XSS_Test_Sched",
    "descr": "XSS+Test",
    "monthsel": "3",
    "starttimehour": "0",
    "starttimemin": "00",
    "stoptimehour": "23",
    "stoptimemin": "59",
    "timerangedescr": "",
    "tempFriendlyTime0": "Sun",
    "starttime0": "0:00",
    "stoptime0": "23:59",
    "timedescr0": "",
    "schedule0": "w11p3-m3d12\"><script>alert('XSS')</script>",
    "marker": "",
    "save": "Save" 
}

Attempting to edit the problematic entry will result in a PHP error:

PHP Fatal error:  Uncaught TypeError: mktime(): Argument #5 ($day) must be of type ?int, string given in /usr/local/www/firewall_schedule_edit.php:494
Stack trace:
#0 /usr/local/www/firewall_schedule_edit.php(494): mktime(0, 0, 0, '3', '12"><572025-03-...', '2025')
#1 {main}
  thrown in /usr/local/www/firewall_schedule_edit.php on line 494

Files

poc-xss-fwsched-16114.py (1.67 KB) poc-xss-fwsched-16114.py Jim Pingle, 04/01/2025 04:47 PM
Actions #1

Updated by Jim Pingle about 2 months ago

  • File poc-xss-fwsched-16114.py added
  • Description updated (diff)

Attached is a small proof of concept script which can trigger the problem. Ensure there is no schedule named XSS_Test_Sched before running the script.

After running the script, an XSS alert will appear on firewall_schedule.php. Attempting to edit the problematic schedule will result in a PHP error.

Actions #2

Updated by Jim Pingle about 2 months ago

  • Priority changed from Normal to Very High
Actions #3

Updated by Jim Pingle about 2 months ago

  • File deleted (poc-xss-fwsched-16114.py)
Actions #6

Updated by Jim Pingle about 2 months ago

  • Status changed from Confirmed to Feedback
  • % Done changed from 0 to 100
Actions #7

Updated by Georgiy Tyutyunnik 26 days ago

tested, reproduced on 25.07.a.20250331.2135
fixed in 25.07.a.20250409.0600 and later

Actions #8

Updated by Jim Pingle 26 days ago

  • Status changed from Feedback to Resolved
Actions #9

Updated by Jim Pingle 4 days ago

  • Private changed from Yes to No
Actions

Also available in: Atom PDF