
pfSense CE 2.9.0-DEVELOPMENT - Medium - Remote - File read - RSS file:// redirect
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · pfsense-rss-file-redirect
Class: File read Reach: Remote
pfSense CE 2.9.0-DEVELOPMENT (9363ac5) - pfsense.org
is_URL() is not HTTP-only. SimplePie fix_protocol() rewrites direct file:// to http. Recursive 3xx Location: file:/// does not call fix_protocol() and file_get_contents the path as root.
| ID | no CVE yet |
| Class | File read |
| Reach | Remote (authenticated WebGUI unless noted) |
| CWE | CWE-73 |
| CVSS | Medium: 6.5 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| Product | pfSense CE |
| Affected | 2.9.0-DEVELOPMENT (9363ac5b8651a1c7a333180425ce7719070f95f9) |
| Auth | WebGUI session with page-dashboard-all / widgets MATCH |
| 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:19100.
Series write-up: https://abraxaslabs.tech/research/pfsense-ce-leftovers
| Method | Sink | Privilege |
|---|---|---|
| Dashboard RSS save of an HTTP URL that 302s to file:// | SimplePie File recursive Location file_get_contents | Integrity: None. Read only. |
| same leftover | same sink | Recon: Lab-proven: HTTP 302 Location: file:/// returned planted XML. Direct file:// rewritten away. |
| same leftover | same sink | Availability: None shown. |
Requires: page-dashboard-all / widgets MATCH. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
Requires: page-dashboard-all / widgets MATCH. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
26_04 title encode on this pin. Operator HTTP(S) feed URL is the feature. Direct file:// rewrite.
No Diagnostics: Command unless that page is also granted.
cd lab
./run.sh
Loopback 127.0.0.1:19100. Compose project pfsense-rss-file-redirect. Witness PFSENSE-RSS-FILE-REDIRECT-WITNESS. Loopback only: 127.0.0.1:19100. Compose project pfsense-rss-file-redirect. Witness PFSENSE-RSS-FILE-REDIRECT-WITNESS. PHP gadget of the pinned lines. Stack tears down after the run.
Last line:
SUCCESS PFSENSE-RSS-FILE-REDIRECT control-rewritten-away=yes trigger-file-location=yes PFSENSE-RSS-FILE-REDIRECT-WITNESS
Force HTTP(S) feeds. Do not follow file: Location. CURLOPT_PROTOCOLS HTTP(S).
9363ac5b8651a1c7a333180425ce7719070f95f9