Cyber Resilience

CVE-2021-41282

Pfsense 2.5.2

Public PoCHigh EPSS
Published
01 March 2022
Modified
21 November 2024
CVSS Score v3.1 8.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.87 99.7th percentile
Risk Priority 87 floored blend · peak EPSS

Summary

CVE-2021-41282 is a high-severity Injection (CWE-74) vulnerability in Pfsense Pfsense. Its CVSS base score is 8.8 (High).

Operationally, ranked in the top 0.3% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

Likely ATT&CK TechniquesAI

Techniques this vulnerability likely enables, inferred from its description, weakness type, and attributed-actor tradecraft. Confidence is per-technique.

T1059 Command and Scripting Interpreter Executionconfidence: HIGH
Authenticated users can inject sed commands via diag_routes.php to execute arbitrary commands on the system.
T1070.004 File Deletion Stealthconfidence: HIGH
The sed injection allows writing arbitrary files to arbitrary locations, enabling deletion or overwriting of files.
T1068 Exploitation for Privilege Escalation Privilege Escalationconfidence: MEDIUM
Arbitrary file write via sed injection can be leveraged to escalate privileges by modifying system binaries or configurations.
inferred from description + CWE · MITRE ATT&CK Enterprise v19.0

CVEs Like This One

CVE-2025-20216Shared CWE-74
CVE-2024-23648Shared CWE-74
CVE-2023-29519Shared CWE-74
CVE-2026-29777Shared CWE-74
CVE-2026-45344Shared CWE-74
CVE-2026-33148Shared CWE-74
CVE-2023-26919Shared CWE-74
CVE-2026-0865Shared CWE-74
CVE-2025-46814Shared CWE-74
CVE-2023-44373Shared CWE-74

Affected Assets

pfsense
pfsense
2.5.2

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.2.1
  • V1.2.3
  • V1.2.5
  • V1.2.8

Likely Mitigating Controls AI

Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-74

Developer assessments and testing (including injection-focused techniques) identify improper neutralization of special elements, and the verifiable flaw remediation corrects them pre-deployment.

addresses: CWE-74

Identifies indicators of injection attacks (command, SQL, LDAP, etc.) via anomaly and attack monitoring.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require input validation and output encoding that prevent injection flaws.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

detects

Security testing in development catches injection vulnerabilities before release.

A.8.15 Logging partial match
detects

Logging supports detection of injection attempts but does not prevent the weakness.

detects

Monitoring activities can identify active injection attacks after they occur.

prevents

Secure development life cycle mandates input validation and output encoding that directly prevent injection flaws.

prevents

Application security requirements explicitly call for controls against injection attacks in software design.

prevents

Secure architecture principles reduce injection surfaces but do not prescribe specific neutralization techniques.

References