Vulnerability Name:

CVE-2021-41282 (CCN-220850)

Assigned:2021-09-15
Published:2022-02-23
Updated:2022-07-12
Summary: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.
CVSS v3 Severity:8.8 High (CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
8.2 High (Temporal CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): Low
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): High
Integrity (I): High
Availibility (A): High
8.8 High (CCN CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
8.2 High (CCN Temporal CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): Low
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): High
Integrity (I): High
Availibility (A): High
CVSS v2 Severity:9.0 High (CVSS v2 Vector: AV:N/AC:L/Au:S/C:C/I:C/A:C)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): Low
Authentication (Au): Single_Instance
Impact Metrics:Confidentiality (C): Complete
Integrity (I): Complete
Availibility (A): Complete
9.0 High (CCN CVSS v2 Vector: AV:N/AC:L/Au:S/C:C/I:C/A:C)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): Low
Athentication (Au): Single_Instance
Impact Metrics:Confidentiality (C): Complete
Integrity (I): Complete
Availibility (A): Complete
Vulnerability Type:CWE-74
Vulnerability Consequences:Gain Access
References:Source: MITRE
Type: CNA
CVE-2021-41282

Source: MISC
Type: Exploit, Third Party Advisory, VDB Entry
http://packetstormsecurity.com/files/166208/pfSense-2.5.2-Shell-Upload.html

Source: MISC
Type: Release Notes, Third Party Advisory
https://docs.netgate.com/pfsense/en/latest/releases/22-01_2-6-0.html

Source: XF
Type: UNKNOWN
pfsense-cve202141282-code-exec(220850)

Source: CCN
Type: pfsense GIT Repository
Regex cleanup should also kill {}. Fixes #12257

Source: CCN
Type: Packet Storm Security [03-04-2022]
pfSense 2.5.2 Shell Upload

Source: MISC
Type: Third Party Advisory
https://www.shielder.it/advisories/

Source: CCN
Type: Shielder Web site
Remote Code Execution in pfSense <= 2.5.2

Source: MISC
Type: Exploit, Third Party Advisory
https://www.shielder.it/advisories/pfsense-remote-command-execution/

Vulnerable Configuration:Configuration 1:
  • cpe:/a:pfsense:pfsense:2.5.2:*:*:*:*:*:*:*

  • Configuration CCN 1:
  • cpe:/a:pfsense:pfsense:2.5.2:*:*:*:*:*:*:*

  • * Denotes that component is vulnerable
    BACK
    pfsense pfsense 2.5.2
    pfsense pfsense 2.5.2