CVE-2021-41282 is a sed-specific code-injection vulnerability in pfSense 2.5.2's diag_routes.php route-diagnostics functionality. The page executes netstat to retrieve firewall route data and parses its output with sed. Although shell arguments are protected with escapeshellarg, authenticated input can inject sed script syntax, allowing an attacker to cause sed to write an arbitrary file to an arbitrary filesystem location.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
This repository contains a single Metasploit module (modules/exploits/unix/http/pfsense_diag_routes_webshell.rb) that exploits CVE-2021-41282, an arbitrary file creation vulnerability in pfSense (versions <= 2.5.2). The exploit requires authentication as a user with the 'WebCfg - Diagnostics: Routing tables' privilege. It abuses the /diag_routes.php endpoint to upload a PHP web shell to /usr/local/www/, enabling remote command execution as root. The module supports both command execution and reverse shell payloads, and can optionally clean up the web shell after exploitation. The code is written in Ruby and leverages Metasploit's HttpClient, CmdStager, and FileDropper mixins. The main attack vector is network-based, targeting the pfSense web interface over HTTPS (default port 443).
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
2 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
A sed script syntax injection vulnerability.
A sed-script syntax injection vulnerability cited as an observed example of CWE-77 command injection.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.