
pfSense CE 2.9.0-DEVELOPMENT - High - Remote - Privilege leftover - hidden uploadconfig
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · pfsense-uploadconfig
Class: Privilege leftover Reach: Remote
pfSense CE 2.9.0-DEVELOPMENT (9363ac5) - pfsense.org
uploadconfig.php POST config= calls config_install() then system_reboot(). IDENT has no warn-root. diag_backup.php is warn-root for the same class.
| ID | no CVE yet |
| Class | Privilege leftover |
| Reach | Remote (authenticated WebGUI unless noted) |
| CWE | CWE-269 |
| 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-hidden-uploadconfiguration |
| 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:19030.
Series write-up: https://abraxaslabs.tech/research/pfsense-ce-leftovers
| Method | Sink | Privilege |
|---|---|---|
| POST uploadconfig.php config= | config_install then system_reboot | Integrity: Lab-proven: POST config= installed the blob and set reboot. GET without POST did not install. |
| same leftover | same sink | Recon: Inferred: attacker-chosen config.xml is full device takeover. |
| same leftover | same sink | Availability: Lab-proven: reboot requested. |
Requires: page-hidden-uploadconfiguration. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
Requires: page-hidden-uploadconfiguration. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
diag_backup.php warn-root. Unauth N/A.
No Diagnostics: Command unless that page is also granted.
cd lab
./run.sh
Loopback 127.0.0.1:19030. Compose project pfsense-uploadconfig. Witness PFSENSE-UPLOADCONFIG-WITNESS. Loopback only: 127.0.0.1:19030. Compose project pfsense-uploadconfig. Witness PFSENSE-UPLOADCONFIG-WITNESS. PHP gadget of the pinned lines. Stack tears down after the run.
Last line:
SUCCESS PFSENSE-UPLOADCONFIG control-no-install=yes trigger-install-reboot=yes ident=page-hidden-uploadconfiguration warn-root=absent PFSENSE-UPLOADCONFIG-WITNESS
Give uploadconfig.php standard-warning-root, or remove the hidden page.
9363ac5b8651a1c7a333180425ce7719070f95f9