{"id":"CVE-2021-41282","published":"2022-03-01T22:45:03Z","modified":"2024-08-04T03:08:31Z","title":"diag_routes.php in pfSense 2.5.2 allows sed data injection","vendor":null,"product":null,"tier":"core","eol":null,"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"The flaw is in diag_routes.php, a component of pfSense 2.5.2, where data retrieved from netstat output is parsed through sed in a way that allows sed-specific code to be injected despite the use of escapeshellarg for arguments. An attacker who is an authenticated user of the firewall can exploit this to write an arbitrary file to an arbitrary location on the system, with the route-viewing functionality being the intended but misused entry point.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:16:14Z"},"cvss":null,"epss":{"score":0.87113,"percentile":0.99749,"date":"2026-11-02","provenance":"source"},"kev":null,"vulncheckKev":null,"exploited":false,"otx":{"pulseCount":1,"pulses":[{"name":"pfSense Remote Code Execution Vulnerability","url":"https://otx.alienvault.com/pulse/621f52d1711d60c8867ed9cd","created":"2022-03-02"}],"provenance":"machine"},"cwes":[],"references":[{"url":"https://www.shielder.it/advisories/","tags":["x_refsource_MISC"]},{"url":"https://www.shielder.it/advisories/pfsense-remote-command-execution/","tags":["x_refsource_MISC"]},{"url":"https://docs.netgate.com/pfsense/en/latest/releases/22-01_2-6-0.html","tags":["x_refsource_MISC"]},{"url":"http://packetstormsecurity.com/files/166208/pfSense-2.5.2-Shell-Upload.html","tags":["x_refsource_MISC"]}],"techniques":[],"reports":[],"affected":[],"advisories":[],"euvd":{"id":"EUVD-2021-28312","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2021-28312","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"metasploit":[{"name":"pfSense Diag Routes Web Shell Upload","module":"exploit/unix/http/pfsense_diag_routes_webshell","type":"exploit","disclosureDate":"2022-02-23","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/http/pfsense_diag_routes_webshell.rb"}],"nuclei":[{"id":"CVE-2021-41282","name":"pfSense - Arbitrary File Write","severity":"high","path":"http/cves/2021/CVE-2021-41282.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-41282.yaml"}],"first":{"date":"2022-02-23","source":"Metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/http/pfsense_diag_routes_webshell.rb"},"provenance":"source"},"exploitRefs":["http://packetstormsecurity.com/files/166208/pfSense-2.5.2-Shell-Upload.html"],"flow":[],"timeline":[{"date":"2022-02-23","kind":"exploit-public","label":"First public exploit: Metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/http/pfsense_diag_routes_webshell.rb","provenance":"source"},{"date":"2022-03-01","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2021-41282","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":"Metasploit","daysToKev":null},"priority":{"score":25.6,"factors":[{"name":"In a KEV catalog","points":0.0,"detail":"not listed"},{"name":"Recent KEV listing","points":0.0,"detail":"not listed"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.95,"detail":"percentile 0.9975"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"1 NVD exploit link; 1 Metasploit module; 1 nuclei template"},{"name":"Mentioned in OTX pulses","points":0.68,"detail":"1 pulse"},{"name":"CVSS severity","points":0.0,"detail":"no CVSS"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}