CVE-2021-41282 Code injection in n/a

High 8.8 Published Updated

Authenticated attackers can inject sed commands to write arbitrary files, potentially leading to code execution or privilege escalation on pfSense firewalls.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2021-41282?

CVE-2021-41282 is a high-severity code injection vulnerability in n/a, published on 1 Mar 2022. Any signed-in user can exploit it over the network, with no action from the victim.

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

Weakness: CWE-74

Which versions are affected by CVE-2021-41282?

It affects 1 product.

Products include Pfsense Pfsense.

How do I fix CVE-2021-41282?

No fix has been published for CVE-2021-41282 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2021-41282 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-41282 exists.

Public exploit code: 1 Metasploit module and 1 Nuclei template.

Sources

Also known as GHSA-px3p-5c29-4jxr.

Is CVE-2021-41282 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free