CVE-2021-41282
HighPublic exploitdiag_routes.php in pfSense 2.5.2 allows sed data injection.
Published Mar 1, 2022 · Updated Jul 9, 2026
Key Facts
Patch immediately- CVE-2021-41282 is a high-severity vulnerability (CVSS 8.8 v3.1) affecting Pfsense.
- It is not listed in any known-exploited vulnerabilities catalog. Public exploit code is available.
- EPSS estimates a 87% probability of exploitation in the next 30 days.
- No fixed version is listed yet; check the vendor advisory for mitigations.
- Brandefense priority: patch immediately, because it is very likely to be exploited soon.
CVSS v3.1
8.8
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS (30-day exploit likelihood)
87%
Higher than 99.7% of all scored CVEs
Exploited in the wild
No known
Not in a known-exploited catalog
Public exploit code
Available
Proof-of-concept or weaponized module
Get the full CVE-2021-41282 brief as a PDF
Every affected product and fixed release, exploitation status and a first 24 hours response checklist, emailed within minutes.
Description
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.
Affected Products
1 affected entries in total| Product | Affected versions | Fixed in |
|---|---|---|
| PfsensePfsense | 2.5.2 | n/a |
Timeline
Publicly disclosed
Mar 1, 2022
Last updated
Jul 9, 2026
Weakness Type
- CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
References
- advisoryhttps://docs.netgate.com/pfsense/en/latest/releases/22-01_2-6-0.html
- advisoryhttps://www.shielder.it/advisories/
- exploithttp://packetstormsecurity.com/files/166208/pfSense-2.5.2-Shell-Upload.html
- exploitMSF pfsense_diag_routes_webshell.rb
- exploithttps://www.shielder.it/advisories/pfsense-remote-command-execution/
FAQ
Common Questions.
diag_routes.php in pfSense 2.5.2 allows sed data injection.
Affected: Pfsense versions 2.5.2. The full list is in the CVE brief.
It is not listed in any known-exploited vulnerabilities catalog.
No, it is not currently listed in the CISA Known Exploited Vulnerabilities catalog.
Public exploit code is available.
No fixed version is listed yet; check the vendor advisory for mitigations.
Brandefense priority: patch immediately, because it is very likely to be exploited soon.
Is CVE-2021-41282 Running On Your Attack Surface?
Brandefense maps vulnerabilities like this one to your internet-facing assets and tells you exactly where to patch.
Request A Demo