Bug #16976
closedPotential XSS in Traffic Graphs Display option
100%
Description
The page at status_graphs.php displays a table of hosts consuming bandwidth in real-time. Optionally, this table can resolve IP addresses to fully qualified domain names or use descriptions from DHCP static mappings or DNS host overrides for display. The values returned by the these lookups are not validated and are displayed without encoding.
These address lookups to return an XSS payload, which could result in XSS depending on the settings on the traffic graphs page.
There are multiple paths which can potentially trigger the problem, but not all of them are viable:
- When Display is set to FQDN:
- Payload in a hostname directly in
/etc/hosts-- Would have to be manually edited in, no way to set that in the GUI as it doesn't pass validation - Payload in a PTR record from DNS -- FreeBSD libraries filter out such invalid hostnames so they don't make it to the client
- Payload in a hostname directly in
- When Display is set to Description:
- Payload in DNS Resolver or DNS Forwarder Host Override descriptions -- Can be set by user and triggers the problem
- Payload in DHCP Static Mapping descriptions -- Could work, but the functionality is broken, see #16979
Files
JP Updated by Jim Pingle about 2 months ago
- File 16976.patch 16976.patch added
- Status changed from Confirmed to Feedback
- % Done changed from 0 to 100
Fixed in commit fd2e6933ee81105246e55be5da0ee2295d30fad1
I added validation of the address lookup result and also fixed the JavaScript that assembles the hosts table to use text-based functions to safely display values for good measure.
Patch is attached.
GT Updated by Georgiy Tyutyunnik about 2 months ago
- Status changed from Feedback to Resolved
patch fixes the issue
tested on:
26.07-BETA (amd64)
built on Fri Jul 17 15:34:00 UTC 2026
FreeBSD 16.0-CURRENT
JP Updated by Jim Pingle about 2 months ago
- Description updated (diff)
- Status changed from Resolved to Feedback
I updated the description with additional clarification on what methods are viable to trigger the issue. The original suggested problem path isn't viable, but one viable exploit path remains. The original patch still covers the fix, but the newly added method to trigger it via DNS Resolver host override descriptions needs validated.
JP Updated by Jim Pingle about 2 months ago
- Related to Bug #16979: Traffic Graphs display option "Description" does not utilize DHCP static mapping descriptions added
JP Updated by Jim Pingle about 2 months ago
- Subject changed from Potential XSS in Traffic Graphs via FQDN resolution to Potential XSS in Traffic Graphs Display option
JP Updated by Jim Pingle about 1 month ago
- Status changed from Feedback to Resolved
JP Updated by Jim Pingle about 1 month ago
- Private changed from Yes to No