
pfSense CE 2.9.0-DEVELOPMENT - Medium - Remote - XSS - CP filename stored XSS
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · pfsense-cp-filename-xss
Class: XSS Reach: Remote
pfSense CE 2.9.0-DEVELOPMENT (9363ac5) - pfsense.org
Filename interpolates into / CSS url(...) on default login HTML with no encode. Portal origin is not the GUI origin. SA-26_05 is the GUI widget.
| ID | no CVE yet |
| Class | XSS |
| Reach | Remote (authenticated WebGUI unless noted) |
| CWE | CWE-79 |
| CVSS | Medium: 6.1 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 plant with page-services-captiveportal-filemanager; victim is an unauth portal client |
| 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:19110.
Series write-up: https://abraxaslabs.tech/research/pfsense-ce-leftovers
| Method | Sink | Privilege |
|---|---|---|
| POST file-manager name, then unauth GET portal login HTML | get_default_captive_portal_html img src={$logo_src} | Integrity: Inferred: script on the portal login can read auth_user / auth_pass on that page. |
| same leftover | same sink | Recon: Lab-proven: raw onerror= plus witness in unauth portal HTML. GUI list htmlspecialchars encoded the same name. |
| same leftover | same sink | Availability: None shown. |
Requires: plant with page-services-captiveportal-filemanager; victim is an unauth portal client. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
Requires: plant with page-services-captiveportal-filemanager; victim is an unauth portal client. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
GUI cookies. File-manager list encode. SA-26_05 widget.
No Diagnostics: Command unless that page is also granted.
cd lab
./run.sh
Loopback 127.0.0.1:19110. Compose project pfsense-cp-filename-xss. Witness PFSENSE-CP-FILENAME-XSS-WITNESS. Loopback only: 127.0.0.1:19110. Compose project pfsense-cp-filename-xss. Witness PFSENSE-CP-FILENAME-XSS-WITNESS. PHP gadget of the pinned lines. Stack tears down after the run.
Last line:
SUCCESS PFSENSE-CP-FILENAME-XSS control-inert=yes trigger-raw=yes witness-unescaped=yes gui-cookie-theft=no PFSENSE-CP-FILENAME-XSS-WITNESS
htmlspecialchars the filename in portal HTML. Restrict upload charset.
9363ac5b8651a1c7a333180425ce7719070f95f9