
pfSense CE 2.9.0-DEVELOPMENT - High - Remote - RCE - Unbound sock-queue-timeout CRLF
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · pfsense-unbound-sock-timeout
Class: RCE Reach: Remote
pfSense CE 2.9.0-DEVELOPMENT (9363ac5) - pfsense.org
sock_queue_timeout is stored raw. unbound.inc emits sock-queue-timeout: {$sock_queue_timeout} with no test_unbound_config on this page. CRLF adds include: / logfile: / python-script:. #16637 is General Settings checkconf only.
| ID | no CVE yet |
| Class | RCE |
| Reach | Remote (authenticated WebGUI unless noted) |
| CWE | CWE-74 |
| 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-services-dnsresolver-advanced |
| 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:19050.
Series write-up: https://abraxaslabs.tech/research/pfsense-ce-leftovers
| Method | Sink | Privilege |
|---|---|---|
| POST services_unbound_advanced.php sock_queue_timeout | unbound.inc sock-queue-timeout: {$sock_queue_timeout} | Integrity: Lab-proven: extra include: in generated conf; stub unbound followed include and dumped the planted witness. |
| same leftover | same sink | Recon: Lab-proven: Unbound parse reads the included host file. |
| same leftover | same sink | Availability: Inferred: poisoned conf can fail resolver start. |
Requires: page-services-dnsresolver-advanced. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
Requires: page-services-dnsresolver-advanced. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
Documented custom_options textarea is a separate leftover. General Settings checkconf does not cover this field.
No Diagnostics: Command unless that page is also granted.
cd lab
./run.sh
Loopback 127.0.0.1:19050. Compose project pfsense-unbound-sock-timeout. Witness PFSENSE-UNBOUND-SOCK-TIMEOUT-WITNESS. Loopback only: 127.0.0.1:19050. Compose project pfsense-unbound-sock-timeout. Witness PFSENSE-UNBOUND-SOCK-TIMEOUT-WITNESS. PHP gadget of the pinned lines. Stack tears down after the run.
Last line:
SUCCESS PFSENSE-UNBOUND-SOCK-TIMEOUT control-one-timeout=yes control-checkconf-pass=yes trigger-include=yes trigger-dump-witness=yes advanced-no-checkconf=yes PFSENSE-UNBOUND-SOCK-TIMEOUT-WITNESS
is_numericint sock_queue_timeout. Run test_unbound_config on Advanced save.
9363ac5b8651a1c7a333180425ce7719070f95f9