# CVE-2021-41282: diagroutes.php in pfSense 2.5.2 allows sed data injection.

- Severity: High 8.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 87.1%, higher than 99% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2022-03-01T22:45:03.000Z
- Modified: 2026-06-17T04:08:14.247Z
- Weaknesses: CWE-74
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- pfsense pfsense: 2.5.2

## Every score

- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 9.0 High `AV:N/AC:L/Au:S/C:C/I:C/A:C`

## References

- <https://www.shielder.it/advisories/pfsense-remote-command-execution/> (exploit, third-party-advisory)
- <http://packetstormsecurity.com/files/166208/pfSense-2.5.2-Shell-Upload.html> (exploit, third-party-advisory, vdb-entry)
- <https://www.shielder.it/advisories/> (third-party-advisory)
- <https://docs.netgate.com/pfsense/en/latest/releases/22-01_2-6-0.html> (release-notes, third-party-advisory)

## Sources

- CVE List: [CVE-2021-41282](https://www.cve.org/CVERecord?id=CVE-2021-41282), CVE Terms of Use, modified 2024-08-04
- NVD: [CVE-2021-41282](https://nvd.nist.gov/vuln/detail/CVE-2021-41282), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-41282 · Whole record: https://cve.day/CVE-2021-41282.json · Rebuilt by cve.day 2026-11-25T22:58:07.093Z
