Rapid7’s 2026 Global Cybersecurity Summit is now available on-demand.Watch sessions.
Rapid7

module

pfSense Diag Routes Web Shell Upload

Disclosed
Feb 23, 2022
Created
Mar 4, 2022

Description

This module exploits an arbitrary file creation vulnerability in the pfSense
HTTP interface (CVE-2021-41282). The vulnerability affects versions
and can be exploited by an authenticated user if they have the
"WebCfg - Diagnostics: Routing tables" privilege.

This module uses the vulnerability to create a web shell and execute payloads
with root privileges.

Authors

Abdel Adim "smaury" Oisfi of Shielder
jbaines-r7

Platform

BSD,Unix

Architectures

cmd, x64

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':


msf > use exploit/unix/http/pfsense_diag_routes_webshell
msf exploit(pfsense_diag_routes_webshell) > show targets
...targets...
msf exploit(pfsense_diag_routes_webshell) > set TARGET < target-id >
msf exploit(pfsense_diag_routes_webshell) > show options
...show and set options...
msf exploit(pfsense_diag_routes_webshell) > exploit

Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.