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-2021-47904

CVE-2021-47904: PhreeBooks 5.2.3 RCE Vulnerability

CVE-2021-47904 is a remote code execution flaw in PhreeBooks 5.2.3 that allows authenticated attackers to upload malicious PHP files. This article covers the technical details, affected versions, and mitigation steps.

Published: January 30, 2026

CVE-2021-47904 Overview

CVE-2021-47904 is an authenticated file upload vulnerability affecting PhreeBooks 5.2.3, an open-source accounting and ERP solution. The vulnerability resides in the Image Manager component, which fails to properly validate uploaded file types. This allows authenticated attackers to upload malicious PHP web shells and achieve remote code execution on the underlying server.

Critical Impact

Authenticated attackers can upload malicious PHP files through the Image Manager, enabling full remote code execution and complete server compromise.

Affected Products

  • PhreeBooks 5.2.3
  • PhreeBooks Image Manager Component
  • PHP-based web servers running PhreeBooks

Discovery Timeline

  • 2026-01-23 - CVE CVE-2021-47904 published to NVD
  • 2026-01-26 - Last updated in NVD database

Technical Details for CVE-2021-47904

Vulnerability Analysis

This vulnerability is classified as CWE-434: Unrestricted Upload of File with Dangerous Type. The Image Manager functionality in PhreeBooks 5.2.3 lacks proper server-side validation of uploaded file types, allowing attackers to bypass intended restrictions and upload arbitrary files including executable PHP scripts. Once a malicious file is uploaded, the attacker can access it directly through the web server, triggering execution of the embedded code with the privileges of the web server process.

The attack requires authentication to access the Image Manager feature, but any authenticated user with access to this functionality can exploit the vulnerability. Given that PhreeBooks is accounting software often containing sensitive financial data, compromise of the application server could lead to significant data breaches, financial fraud, or lateral movement within the network.

Root Cause

The root cause is inadequate file upload validation in the Image Manager component. The application fails to implement proper server-side checks for uploaded file content and extensions. Instead of using a whitelist approach to restrict uploads to legitimate image file types (e.g., .jpg, .png, .gif), the application either performs no validation or relies solely on client-side controls that can be easily bypassed.

The absence of content-type verification (magic byte checking), filename sanitization, and execution prevention in the upload directory creates a direct path to remote code execution.

Attack Vector

The attack is conducted over the network and requires low privileges (authenticated user access). An attacker must first authenticate to the PhreeBooks application, then navigate to the Image Manager functionality. By crafting a malicious HTTP request, the attacker uploads a PHP file containing a web shell payload instead of a legitimate image file.

The malicious file is stored in a web-accessible directory without proper sanitization. The attacker then accesses the uploaded file directly via its URL, causing the web server to execute the PHP code. This grants the attacker command execution capabilities on the server, potentially leading to complete system compromise.

For technical details and proof-of-concept information, refer to the GitHub PoC Repository and the VulnCheck Advisory.

Detection Methods for CVE-2021-47904

Indicators of Compromise

  • Presence of unexpected .php files in image upload directories (commonly /images/, /uploads/, or similar paths)
  • Web server access logs showing requests to newly created PHP files in upload directories
  • Suspicious POST requests to the Image Manager endpoint with non-image content types
  • Unusual process execution from the web server user context (www-data, apache, nginx)

Detection Strategies

  • Monitor file system changes in web-accessible upload directories for creation of executable files
  • Implement web application firewall (WAF) rules to detect PHP code patterns in file upload requests
  • Review web server logs for sequential patterns of file upload followed by immediate access to the uploaded path
  • Deploy file integrity monitoring (FIM) on the PhreeBooks installation directory

Monitoring Recommendations

  • Enable verbose logging for the PhreeBooks application and the underlying web server
  • Configure alerts for new executable file creation within the web application directory structure
  • Monitor outbound network connections from the web server for potential command-and-control communication
  • Implement anomaly detection for user behavior, particularly around the Image Manager functionality

How to Mitigate CVE-2021-47904

Immediate Actions Required

  • Restrict access to the Image Manager functionality to only essential administrative users
  • Review the upload directory for any suspicious PHP files and remove any unauthorized content
  • Implement network segmentation to limit the impact of potential server compromise
  • Consider temporarily disabling the Image Manager feature until a patch is applied

Patch Information

Users should check the PhreeSoft Homepage for security updates or upgraded versions that address this vulnerability. Review the VulnCheck Advisory for additional remediation guidance. If no official patch is available, consider migrating to an alternative solution or implementing the workarounds below.

Additional technical details are available at Exploit-DB #46645 and Exploit-DB #49524.

Workarounds

  • Configure the web server to deny execution of PHP files in the upload directory using .htaccess or equivalent server configuration
  • Implement additional server-side file type validation at the web server or reverse proxy level
  • Deploy a web application firewall (WAF) to filter malicious upload attempts
  • Restrict the Image Manager functionality through application-level access controls
bash
# Apache configuration to prevent PHP execution in upload directory
# Add to .htaccess in the upload directory or VirtualHost configuration
<Directory "/var/www/phreebooks/images">
    php_admin_flag engine off
    <FilesMatch "\.php$">
        Require all denied
    </FilesMatch>
</Directory>

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechPhreebooks

  • SeverityHIGH

  • CVSS Score8.7

  • EPSS Probability0.35%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-434
  • Technical References
  • GitHub PoC Repository

  • Exploit-DB #46645

  • Exploit-DB #49524

  • PhreeSoft Homepage

  • VulnCheck Advisory
  • Latest CVEs
  • CVE-2025-70797: LimeSurvey XSS Vulnerability

  • CVE-2025-30650: Juniper Junos OS Auth Bypass Vulnerability

  • CVE-2026-35471: Goshs Path Traversal Vulnerability

  • CVE-2026-35393: Goshs Path Traversal 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