
pfSense CE 2.9.0-DEVELOPMENT - High - Remote - Config injection - CP maxprocperip nginx
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · pfsense-cp-maxprocperip
Class: Config injection Reach: Remote
pfSense CE 2.9.0-DEVELOPMENT (9363ac5) - pfsense.org
Integer check is on unused POST maxproc. maxprocperip is stored raw and emitted as limit_conn addr $maxprocperip; inside server{}. Extra location/alias is accepted.
| ID | no CVE yet |
| Class | Config injection |
| Reach | Remote (authenticated WebGUI unless noted) |
| CWE | CWE-94 |
| CVSS | High: 7.1 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L |
| Product | pfSense CE |
| Affected | 2.9.0-DEVELOPMENT (9363ac5b8651a1c7a333180425ce7719070f95f9) |
| Auth | WebGUI session with plant with page-services-captiveportal; then unauth on the portal listener |
| 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:19120.
Series write-up: https://abraxaslabs.tech/research/pfsense-ce-leftovers
| Method | Sink | Privilege |
|---|---|---|
| POST services_captiveportal.php maxprocperip, then unauth GET portal vhost | system_generate_nginx_config limit_conn addr $maxprocperip; | Integrity: Lab-proven: extra location /p { alias /oracle/; } inside CP server{}. nginx -t passed. |
| same leftover | same sink | Recon: Lab-proven: unauth GET of that location returned the planted file on the portal vhost, not the GUI. Host RCE not shown. |
| same leftover | same sink | Availability: Inferred: invalid nginx fails to start that zone. |
Requires: plant with page-services-captiveportal; then unauth on the portal listener. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
Requires: plant with page-services-captiveportal; then unauth on the portal listener. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
GUI nginx (captive_portal=false). Unauth plant. Host RCE.
No Diagnostics: Command unless that page is also granted.
cd lab
./run.sh
Loopback 127.0.0.1:19120. Compose project pfsense-cp-maxprocperip. Witness PFSENSE-CP-MAXPROCPERIP-WITNESS. Loopback only: 127.0.0.1:19120. Compose project pfsense-cp-maxprocperip. Witness PFSENSE-CP-MAXPROCPERIP-WITNESS. PHP gadget of the pinned lines. Stack tears down after the run.
Last line:
SUCCESS PFSENSE-CP-MAXPROCPERIP control-limit-conn=yes nginx-t-control=yes trigger-inject=yes nginx-t-trigger=yes host-read=yes fail-to-start=no PFSENSE-CP-MAXPROCPERIP-WITNESS
is_numericint maxprocperip. Reject braces/semicolons.
9363ac5b8651a1c7a333180425ce7719070f95f9