Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2025-53392 Overview
CVE-2025-53392 affects Netgate pfSense CE 2.8.0. The WebCfg - Diagnostics: Command privilege permits reading arbitrary files on the firewall through directory traversal in the dlPath parameter of diag_command.php. An authenticated user holding this privilege can traverse the filesystem and retrieve any file readable by the web server process.
The vendor states that this behavior is intentional for the privilege level. Netgate documents the risk in both product documentation and the user interface, treating the Diagnostics: Command privilege as administrator-equivalent. The weakness is classified under [CWE-36: Absolute Path Traversal].
Critical Impact
Authenticated users with the WebCfg - Diagnostics: Command privilege can read arbitrary files from the pfSense host, including configuration files and credentials stored on disk.
Affected Products
- Netgate pfSense CE 2.8.0 (Community Edition)
- Deployments granting the WebCfg - Diagnostics: Command privilege to non-administrator roles
- Web administration interface component diag_command.php
Discovery Timeline
- 2025-06-28 - CVE-2025-53392 published to the National Vulnerability Database
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-53392
Vulnerability Analysis
The flaw resides in diag_command.php, the pfSense Diagnostics Command Prompt page. This page exposes a download function controlled by the dlPath request parameter. The handler does not restrict dlPath to a safe base directory. A user supplying an absolute path or traversal sequence can cause the server to return the contents of files outside the intended scope.
Exploitation requires authenticated access and the WebCfg - Diagnostics: Command privilege. The attacker issues an HTTP request to diag_command.php with a crafted dlPath value pointing to a target file such as /cf/conf/config.xml or /etc/master.passwd. The server responds with the raw file contents.
The vendor disputes severity. Netgate considers the Diagnostics: Command privilege equivalent to full administrative access and documents this expectation. Organizations that delegate this privilege to lower-trust operators inherit arbitrary file read as a consequence.
Root Cause
The root cause is missing path canonicalization and base-directory enforcement on the dlPath parameter. The download routine trusts the privilege check rather than validating that the requested path remains within an approved directory tree.
Attack Vector
The attack vector is network-based through the pfSense web interface. An authenticated session with the Diagnostics: Command privilege sends a GET request to diag_command.php with dlPath set to a traversal payload. No user interaction is required beyond the attacker's own session.
// Conceptual request pattern (described in prose)
// GET /diag_command.php?dlPath=/path/to/sensitive/file
// Server returns raw file contents without base-directory validation
See the GitHub Security Research Repository for technical analysis.
Detection Methods for CVE-2025-53392
Indicators of Compromise
- Web server access log entries containing diag_command.php with a dlPath query parameter referencing paths outside the pfSense web root
- Requests to diag_command.php from accounts that are not full administrators
- dlPath values containing absolute paths such as /cf/, /etc/, /root/, or /var/
- Unexpected downloads of config.xml, master.passwd, SSH keys, or certificate stores from the firewall
Detection Strategies
- Parse pfSense lighttpd or nginx access logs for diag_command.php requests and extract the dlPath parameter for review
- Alert on any dlPath value that resolves outside the pfSense temporary download directory
- Correlate web requests with the authenticated username and privilege set to flag non-administrator accounts invoking the diagnostics download
Monitoring Recommendations
- Forward pfSense web interface logs to a central SIEM for retention and correlation
- Baseline normal administrative activity on diag_command.php and alert on deviations
- Audit user and group privilege assignments on a recurring schedule to detect drift toward overprivileged accounts
How to Mitigate CVE-2025-53392
Immediate Actions Required
- Review all pfSense user accounts and groups and remove the WebCfg - Diagnostics: Command privilege from any role that is not fully administrative
- Restrict pfSense web interface access to management networks only using firewall rules on the WAN and LAN interfaces
- Rotate credentials, API keys, and certificates that may have been exposed through unrestricted file reads
- Enable multi-factor authentication on all pfSense administrative accounts
Patch Information
Netgate has not released a patch. The vendor considers the behavior intentional because the WebCfg - Diagnostics: Command privilege is treated as administrator-equivalent. Mitigation relies on privilege hygiene rather than a code fix. Monitor the Netgate pfSense release notes for any future changes.
Workarounds
- Grant the WebCfg - Diagnostics: Command privilege only to accounts that already hold full administrator rights
- Place the pfSense web interface behind a VPN or jump host so only trusted operators reach the login page
- Enable session timeouts and IP-based access restrictions in System > Advanced > Admin Access
- Log and review all authentications to the pfSense web interface to detect misuse of privileged accounts
# Example: restrict WebGUI access to a management subnet via console
# Edit System > Advanced > Admin Access or add a firewall rule equivalent to:
# pass in quick on $mgmt_if proto tcp from 10.0.0.0/24 to (self) port 443
# block in quick proto tcp to (self) port 443
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

