
pfSense CE 2.9.0-DEVELOPMENT - Medium - Remote - XSS - LDAP username in head.inc
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · pfsense-auth-username-xss
Class: XSS Reach: Remote
pfSense CE 2.9.0-DEVELOPMENT (9363ac5) - pfsense.org
head.inc logout title interpolates $_SESSION['Username'] raw. passwordmg Form_StaticText is also raw. Local charset rejects the trigger; LDAP names skip it.
| 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 LDAP/RADIUS WebGUI session |
| 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:19170.
Series write-up: https://abraxaslabs.tech/research/pfsense-ce-leftovers
| Method | Sink | Privilege |
|---|---|---|
| LDAP login with a quote-breaking username | head.inc logout title="Logout ({$_SESSION['Username']}@$system_url)" | Integrity: Lab-proven: quote-break raw in logout HTML and StaticText. |
| same leftover | same sink | Recon: Lab-proven: session username reflected on every authed page that includes head.inc. |
| same leftover | same sink | Availability: None shown. |
Requires: LDAP/RADIUS WebGUI session. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
Requires: LDAP/RADIUS WebGUI session. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
Local [^a-zA-Z0-9.-_] charset. htmlspecialchars($system_url). Unauth N/A.
No Diagnostics: Command unless that page is also granted.
cd lab
./run.sh
Loopback 127.0.0.1:19170. Compose project pfsense-auth-username-xss. Witness PFSENSE-AUTH-USERNAME-XSS-WITNESS. Loopback only: 127.0.0.1:19170. Compose project pfsense-auth-username-xss. Witness PFSENSE-AUTH-USERNAME-XSS-WITNESS. PHP gadget of the pinned lines. Stack tears down after the run.
Last line:
SUCCESS PFSENSE-AUTH-USERNAME-XSS control-admin-encoded=yes trigger-quote-break=yes witness-unescaped=yes local-charset-blocks-trigger=yes PFSENSE-AUTH-USERNAME-XSS-WITNESS
htmlspecialchars the session username in head.inc and passwordmg.
9363ac5b8651a1c7a333180425ce7719070f95f9