
pfSense CE 2.9.0-DEVELOPMENT - Medium - Remote - XSS - firewall_rules GET if
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · pfsense-rules-if-xss
Class: XSS Reach: Remote
pfSense CE 2.9.0-DEVELOPMENT (9363ac5) - pfsense.org
firewall_rules.php GET if= interpolates into value="" and iface = "" when requirefirewallinterface is on. Unknown if is replaced with lan when require is off.
| ID | no CVE yet |
| Class | XSS |
| Reach | Remote (authenticated WebGUI unless noted) |
| CWE | CWE-79 |
| CVSS | Medium: 5.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| Product | pfSense CE |
| Affected | 2.9.0-DEVELOPMENT (9363ac5b8651a1c7a333180425ce7719070f95f9) |
| Auth | WebGUI session with page-firewall-rules |
| License | GNU Affero GPL v3.0 |
| Lab | 127.0.0.1 only |
I pinned public master 9363ac5. The lab is a PHP gadget of the pinned sink, loopback HTTP on 127.0.0.1:19140.
Series write-up: https://abraxaslabs.tech/research/pfsense-ce-leftovers
| Method | Sink | Privilege |
|---|---|---|
| GET firewall_rules.php?if= | value="" and JS iface = "" | Integrity: Lab-proven: quote-break raw in the hidden attr and JS string. |
| same leftover | same sink | Recon: Inferred: victim csrf-magic / same-origin GUI. Cookie httponly SameSite=Strict. |
| same leftover | same sink | Availability: None shown. |
Requires: page-firewall-rules. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
Requires: page-firewall-rules. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
Other $if hrefs and Location use htmlspecialchars. require-off replaces unknown if. Unauth N/A.
No Diagnostics: Command unless that page is also granted.
cd lab
./run.sh
Loopback 127.0.0.1:19140. Compose project pfsense-rules-if-xss. Witness PFSENSE-RULES-IF-XSS-WITNESS. Loopback only: 127.0.0.1:19140. Compose project pfsense-rules-if-xss. Witness PFSENSE-RULES-IF-XSS-WITNESS. PHP gadget of the pinned lines. Stack tears down after the run.
Last line:
SUCCESS PFSENSE-RULES-IF-XSS control-inert=yes trigger-attr=yes trigger-js=yes PFSENSE-RULES-IF-XSS-WITNESS
htmlspecialchars($if, ENT_QUOTES) in both sinks. Allowlist if against configured interfaces.
9363ac5b8651a1c7a333180425ce7719070f95f9