
pfSense CE 2.9.0-DEVELOPMENT - High - Remote - RCE - wireless clone ifconfig
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · pfsense-wireless-clone
Class: RCE Reach: Remote
pfSense CE 2.9.0-DEVELOPMENT (9363ac5) - pfsense.org
interfaces_wireless_edit.php stores $_POST['if'] with no allowlist. interface_wireless_clone interpolates interface_get_wireless_base($wlcfg['if']) into exec("/sbin/ifconfig wlan create wlandev {$baseif} {$mode} bssid 2>&1"). A _wlan suffix is stripped; a semicolon before that survives. Mode is a constant. Hidden cloneif is generated, not taken from POST.
| ID | no CVE yet |
| Class | RCE |
| Reach | Remote (authenticated WebGUI unless noted) |
| CWE | CWE-78 |
| CVSS | High: 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Product | pfSense CE |
| Affected | 2.9.0-DEVELOPMENT (9363ac5b8651a1c7a333180425ce7719070f95f9) |
| Auth | WebGUI session with page-interfaces-wireless-edit |
| 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:18910.
Series write-up: https://abraxaslabs.tech/research/pfsense-ce-leftovers
| Method | Sink | Privilege |
|---|---|---|
| POST interfaces_wireless_edit.php if | interfaces.inc interface_wireless_clone exec ifconfig wlan create wlandev {$baseif} | Integrity: Lab-proven: POST if=ath0;w ran extra w via /bin/sh -c and wrote the witness. Root host commands from wireless-edit only. |
| same leftover | same sink | Recon: Inferred: same root shell can read config.xml and keys. This page does not print exec output. |
| same leftover | same sink | Availability: Inferred: hostile ifconfig on wireless clones. |
Requires: page-interfaces-wireless-edit. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
Requires: page-interfaces-wireless-edit. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
Mode is not the injector. Hidden cloneif is not copied from POST. Unauth N/A. Diagnostics: Command not required and not granted.
No Diagnostics: Command unless that page is also granted.
cd lab
./run.sh
Loopback 127.0.0.1:18910. Compose project pfsense-wireless-clone. Witness PFSENSE-WIRELESS-CLONE-WITNESS. Loopback only: 127.0.0.1:18910. Compose project pfsense-wireless-clone. Witness PFSENSE-WIRELESS-CLONE-WITNESS. PHP gadget of the pinned lines. Stack tears down after the run.
Last line:
SUCCESS PFSENSE-WIRELESS-CLONE control-wlandev=yes trigger-exec=yes hidden-cloneif-copied=no PFSENSE-WIRELESS-CLONE-WITNESS
Allowlist POST if against live wireless parents. escapeshellarg $baseif before ifconfig.
9363ac5b8651a1c7a333180425ce7719070f95f9