CVE-2021-41282
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....
- Published
- Mar 1, 2022
- Updated
- Aug 4, 2024
- Assigning CNA
- mitre
Primary CVSS
nvd · CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HHigh · next 30 days
- Percentile
- 99.8%
- Model date
- Nov 6, 2026
EPSS is a statistical estimate, not a certainty or a measure of impact. Combine it with CVSS, KEV status, exposure and your environment.
Summary
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.
Sources
modules/exploits/unix/http/pfsense_diag_routes_webshell.rb
Metasploit Framework modulesDeclared conditions
- platform: BSD,Unix($.exploit_unix/http/pfsense_diag_routes_webshell.platform)
- verification: check_declared($.exploit_unix/http/pfsense_diag_routes_webshell.check)
- pfSense - Arbitrary File WriteTemplate
http/cves/2021/CVE-2021-41282.yaml
Nuclei TemplatesDeclared conditions
- network: http($.protocol_keys)
- verification: dsl($.matchers[*].type)
Responsible use
Use vulnerability information only on systems you own or are authorized to test. Kitploit links to public research metadata and does not store exploit code or malicious payloads.