
pfSense CE 2.9.0-DEVELOPMENT - High - Remote - Privilege leftover - readonly config_install
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · pfsense-config-readonly-restore
Class: Privilege leftover Reach: Remote
pfSense CE 2.9.0-DEVELOPMENT (9363ac5) - pfsense.org
write_config honors user-config-readonly. config_install and config_restore replace config.xml without that check.
| ID | no CVE yet |
| Class | Privilege leftover |
| Reach | Remote (authenticated WebGUI unless noted) |
| CWE | CWE-863 |
| CVSS | High: 7.1 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L |
| Product | pfSense CE |
| Affected | 2.9.0-DEVELOPMENT (9363ac5b8651a1c7a333180425ce7719070f95f9) |
| Auth | WebGUI session with a page that can call config_install / config_restore while Deny Config Write is set |
| 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:19200.
Series write-up: https://abraxaslabs.tech/research/pfsense-ce-leftovers
| Method | Sink | Privilege |
|---|---|---|
| config_install / config_restore as a Deny Config Write user | config_install copies onto config.xml | Integrity: Lab-proven: write_config denied; config_install and config_restore still replaced config.xml. |
| same leftover | same sink | Recon: None shown. |
| same leftover | same sink | Availability: Inferred: planted config can reboot / lock out. |
Requires: a page that can call config_install / config_restore while Deny Config Write is set. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
Requires: a page that can call config_install / config_restore while Deny Config Write is set. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
Normal config writes stay denied.
No Diagnostics: Command unless that page is also granted.
cd lab
./run.sh
Loopback 127.0.0.1:19200. Compose project pfsense-config-readonly-restore. Witness PFSENSE-CONFIG-READONLY-RESTORE-WITNESS. Loopback only: 127.0.0.1:19200. Compose project pfsense-config-readonly-restore. Witness PFSENSE-CONFIG-READONLY-RESTORE-WITNESS. PHP gadget of the pinned lines. Stack tears down after the run.
Last line:
SUCCESS PFSENSE-CONFIG-READONLY-RESTORE write-denied=yes install-replace=yes restore-replace=yes PFSENSE-CONFIG-READONLY-RESTORE-WITNESS
Honor user-config-readonly in config_install and config_restore.
9363ac5b8651a1c7a333180425ce7719070f95f9