CVE-2021-41282 in the critical feed json
diag_routes.php in pfSense 2.5.2 allows sed data injection.
published 4y ago modified 4mo ago also EUVD-2021-28312
- cvss
- 8.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 87.1%
- EPSS 87.1% chance of exploitation in 30 days, percentile 99.7%
- public exploits
- 1
- Metasploit, plus a Nuclei check
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.
Is CVE-2021-41282 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerTimeline
- First public exploit (Metasploit exploit/unix/http/pfsense_diag_routes_webshell)
- Published
Exploit prediction
87.11% chance of exploitation in the next 30 days, higher than 99.7% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- Metasploit exploit/unix/http/pfsense_diag_routes_webshell pfSense Diag Routes Web Shell Upload metasploit exploit, excellent rank, 2022-02-23
- Nuclei template pfSense - Arbitrary File Write nuclei detection template
- shielder.it https://www.shielder.it/advisories/pfsense-remote-command-execution/ referenced PoC, tagged "exploit" by a source, unverified
- packetstormsecurity.com http://packetstormsecurity.com/files/166208/pfSense-2.5.2-Shell-Upload.html referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 9.0 | AV:N/AC:L/Au:S/C:C/I:C/A:C |
Classification
- Weakness
-
- CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component
References
-
shielder.it
/advisories/pfsense-remote-command-execution/
exploit, third-party-advisory
-
packetstormsecurity.com
/files/166208/pfSense-2.5.2-Shell-Upload.html
exploit, third-party-advisory, vdb-entry
-
shielder.it
/advisories/
third-party-advisory
-
docs.netgate.com
/pfsense/en/latest/releases/22-01_2-6-0.html
release-notes, third-party-advisory
Sources
- CVE List CVE-2021-41282
- NVD CVE-2021-41282
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.