diag_routes.php in pfSense 2.5.2 allows sed data injection. Authenticated users are intended to be able to view data about the routes set in the firewall. The data is retrieved by executing the netstat utility, and then its output is parsed via the sed utility. Although the common protection mechanisms against command injection (i.e., the usage of the escapeshellarg function for the arguments) are used, it is still possible to inject sed-specific code and write an arbitrary file in an arbitrary location.
Threat-Mapped Scoring
Score: 0.0
Priority: Unclassified
EPSS
Score: 0.9188 Percentile:
0.99675
CVSS Scoring
CVSS v3.1 Score: 8.8
Severity: HIGH
Mapped CWE(s)
CWE-74
: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
All CAPEC(s)
CAPEC-10: Buffer Overflow via Environment Variables
CAPEC-101: Server Side Include (SSI) Injection
CAPEC-105: HTTP Request Splitting
CAPEC-108: Command Line Execution through SQL Injection