The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2023-27253

CVE-2023-27253: Netgate pfSense RCE Vulnerability

CVE-2023-27253 is a command injection RCE flaw in Netgate pfSense v2.7.0 that allows authenticated attackers to execute arbitrary commands. This article covers the technical details, affected versions, and mitigation.

Published: February 4, 2026

CVE-2023-27253 Overview

A command injection vulnerability exists in the restore_rrddata() function of Netgate pfSense v2.7.0. This security flaw allows authenticated attackers to execute arbitrary commands on the underlying system by manipulating the contents of an XML file supplied to the config.xml component. The vulnerability stems from improper input sanitization when processing RRD (Round-Robin Database) data during backup restoration operations.

Critical Impact

Authenticated attackers can achieve full system compromise through arbitrary command execution on pfSense firewall appliances, potentially leading to complete network infrastructure takeover.

Affected Products

  • Netgate pfSense v2.7.0
  • pfSense installations using the RRD backup/restore functionality
  • Systems where config.xml restoration is performed

Discovery Timeline

  • 2023-03-17 - CVE-2023-27253 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2023-27253

Vulnerability Analysis

This command injection vulnerability exists within the restore_rrddata() function in pfSense's configuration library. The vulnerability is exploitable over the network and requires low privileges (authenticated user access). The flaw allows attackers with valid credentials to inject malicious commands through specially crafted XML content within the RRD data restoration process.

The vulnerable code path processes filenames from user-controlled XML input without proper sanitization before passing them to shell commands via PHP's exec() function. This creates a direct injection point where malicious payloads embedded in the filename parameter are executed with the privileges of the web server process.

Root Cause

The root cause is insufficient input validation and improper shell argument handling in two key areas:

  1. Path Traversal via Filename: The $rrd['filename'] value from user-supplied XML was directly concatenated into file paths without using basename() to strip directory components
  2. Command Injection via exec(): File paths were passed to the rrdtool command using simple string interpolation with single quotes instead of proper shell argument escaping via escapeshellarg()

The original vulnerable code constructed commands like:

php
exec("$rrdtool restore -f '{$xml_file}' '{$rrd_file}'", $output, $status);

This allowed attackers to break out of the quoted context and inject arbitrary shell commands through specially crafted filenames containing shell metacharacters.

Attack Vector

The attack vector involves an authenticated user with access to the pfSense backup/restore functionality. The attacker can craft a malicious configuration backup file containing a weaponized rrddata section with filenames designed to escape the shell command context and execute arbitrary commands.

The following patch demonstrates the security fix applied by Netgate:

text
 	foreach ($conf['rrddata']['rrddatafile'] as $rrd) {
 		if ($rrd['xmldata']) {
-			$rrd_file = "{$g['vardb_path']}/rrd/{$rrd['filename']}";
+			$rrd_file = "{$g['vardb_path']}/rrd/" . basename($rrd['filename']);
 			$xml_file = preg_replace('/\.rrd$/', ".xml", $rrd_file);
 			if (file_put_contents($xml_file, gzinflate(base64_decode($rrd['xmldata']))) === false) {
 				log_error(sprintf(gettext("Cannot write %s"), $xml_file));
 				continue;
 			}
 			$output = array();
 			$status = null;
-			exec("$rrdtool restore -f '{$xml_file}' '{$rrd_file}'", $output, $status);
+			exec("{$rrdtool} restore -f " . escapeshellarg($xml_file) . ' ' . escapeshellarg($rrd_file), $output, $status);
 			if ($status) {
 				log_error("rrdtool restore -f '{$xml_file}' '{$rrd_file}' failed returning {$status}.");
 				continue;
 			}
 			unlink($xml_file);
 		} else if ($rrd['data']) {
-			$rrd_file = "{$g['vardb_path']}/rrd/{$rrd['filename']}";
+			$rrd_file = "{$g['vardb_path']}/rrd/" . basename($rrd['filename']);
 			$rrd_fd = fopen($rrd_file, "w");
 			if (!$rrd_fd) {
 				log_error(sprintf(gettext("Cannot write %s"), $rrd_file));

Source: GitHub pfSense Commit

Detection Methods for CVE-2023-27253

Indicators of Compromise

  • Unusual process spawning from the pfSense web server process (typically running as www or nobody)
  • Suspicious entries in pfSense system logs related to RRD restore operations
  • Unexpected shell commands or child processes associated with rrdtool execution
  • Modified or suspicious config.xml backup files containing unusual characters in RRD filename fields
  • Network connections originating from the pfSense appliance to unexpected external hosts

Detection Strategies

  • Monitor authentication logs for suspicious backup restoration activity from unusual IP addresses or at unusual times
  • Implement file integrity monitoring on the pfSense configuration directory (/cf/conf/)
  • Deploy network detection rules to identify command injection patterns in HTTP POST requests to the pfSense web interface
  • Analyze web server access logs for requests to backup/restore endpoints with anomalous parameters

Monitoring Recommendations

  • Enable verbose logging for pfSense backup and restore operations
  • Configure alerting for failed or suspicious RRD restore attempts in system logs
  • Implement process monitoring to detect unexpected command execution from the web server context
  • Review audit logs for configuration changes and backup restoration events

How to Mitigate CVE-2023-27253

Immediate Actions Required

  • Upgrade pfSense to a patched version immediately
  • Audit recent backup restoration activities for signs of exploitation
  • Review user accounts with backup/restore privileges and remove unnecessary access
  • Validate the integrity of any recently restored configuration backups

Patch Information

Netgate has released a security patch addressing this vulnerability. The fix implements two key security improvements:

  1. Path Sanitization: The patch uses basename() to strip any directory components from user-supplied filenames, preventing path traversal attacks
  2. Shell Argument Escaping: The patch replaces direct string interpolation with escapeshellarg() to properly escape shell arguments

The security fix is available in commit ca80d18. Additional details can be found in the pfSense Issue Tracker #13935.

Workarounds

  • Restrict access to the pfSense backup/restore functionality to only trusted administrators
  • Implement network-level access controls to limit which IP addresses can access the pfSense web interface
  • Validate and sanitize any configuration backup files before restoration
  • Consider disabling web-based backup restoration and use command-line tools with proper input validation instead
bash
# Restrict web interface access to specific management networks
# Add to /etc/pf.conf or configure via pfSense GUI
# Example: Allow only trusted management subnet
pass in on $wan_if proto tcp from 10.0.0.0/24 to any port 443
block in on $wan_if proto tcp from any to any port 443

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechNetgate Pfsense

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability79.18%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-91
  • Technical References
  • Packet Storm Command Injection
  • Vendor Resources
  • GitHub pfSense Commit Update

  • pfSense Issue Tracker #13935
  • Related CVEs
  • CVE-2023-48123: Netgate pfSense RCE Vulnerability

  • CVE-2023-42326: Netgate pfSense RCE Vulnerability

  • CVE-2023-42325: Netgate pfSense XSS Vulnerability

  • CVE-2024-46538: Netgate pfSense XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English