A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2026-42879

CVE-2026-42879: FacturaScripts RCE Vulnerability

CVE-2026-42879 is a remote code execution flaw in FacturaScripts that allows authenticated attackers to upload malicious PHP files via image upload bypass. This post covers the technical details, affected versions, and mitigation.

Published: May 28, 2026

CVE-2026-42879 Overview

CVE-2026-42879 is an authenticated unrestricted file upload vulnerability in FacturaScripts, an open source accounting and invoicing platform. The flaw affects version 2025.81 and earlier releases. The vulnerability resides in the addImageAction() method within Core/Lib/ExtendedController/ProductImagesTrait.php. Attackers holding valid credentials can upload a PHP file disguised as a GIF image by prepending a GIF89a header, bypassing MIME type validation. The application stores the uploaded file with its original extension, including executable extensions such as .php. The issue is tracked under [CWE-94] Improper Control of Generation of Code.

Critical Impact

Authenticated attackers can upload PHP files through the product image upload feature and achieve code execution on the web server.

Affected Products

  • FacturaScripts version 2025.81
  • FacturaScripts versions prior to 2025.81
  • Deployments exposing the product image upload functionality to authenticated users

Discovery Timeline

  • 2026-05-27 - CVE CVE-2026-42879 published to NVD
  • 2026-05-27 - Last updated in NVD database

Technical Details for CVE-2026-42879

Vulnerability Analysis

The vulnerability exists in the product image upload handler implemented in the addImageAction() method of Core/Lib/ExtendedController/ProductImagesTrait.php. The handler validates uploaded files by inspecting the MIME type signature at the beginning of the file content. An attacker can satisfy this check by placing a valid GIF89a magic header at the start of a file. The remainder of the file can contain arbitrary PHP code.

The application then writes the file to the server using the attacker-supplied filename and extension. Because the extension is preserved, files ending in .php are stored in a location served by the PHP interpreter. Subsequent HTTP requests to the uploaded file execute the embedded PHP payload under the privileges of the web server process.

Exploitation requires valid application credentials, which limits the attack to users who can authenticate or to attackers who obtain credentials through other means. The CVSS vector indicates a network-reachable attack with low privileges and no user interaction.

Root Cause

The root cause is incomplete input validation in the upload routine. The handler relies on content-based MIME detection but does not enforce a whitelist of allowed file extensions. The application trusts the client-supplied extension when persisting the file to disk, allowing executable script extensions to pass through unchanged.

Attack Vector

An authenticated user submits a crafted multipart upload to the product image endpoint. The payload contains a GIF89a header followed by PHP code and uses a filename such as shell.php. After upload, the attacker requests the resulting URL to invoke the PHP interpreter and execute commands on the host. Refer to the GitHub Security Advisory GHSA-vf3q-frmr-vrr9 for additional technical context.

Detection Methods for CVE-2026-42879

Indicators of Compromise

  • Files with .php, .phtml, or other executable extensions present in FacturaScripts product image storage directories.
  • Image files whose contents begin with GIF89a but contain PHP tags such as <?php later in the file body.
  • Unexpected outbound network connections originating from the web server process following image upload activity.

Detection Strategies

  • Inspect web server access logs for POST requests to the product image upload endpoint followed by GET requests to newly created files with script extensions.
  • Scan image upload directories for files whose extension does not match the expected .gif, .jpg, .jpeg, .png, or .webp set.
  • Run static content scans that flag files containing both image magic bytes and PHP code constructs.

Monitoring Recommendations

  • Monitor authentication logs for credential abuse and unexpected logins preceding upload activity.
  • Alert on creation of new files in web-accessible upload directories outside expected change windows.
  • Track child processes spawned by the PHP-FPM or web server worker, including shell interpreters and reconnaissance commands.

How to Mitigate CVE-2026-42879

Immediate Actions Required

  • Upgrade FacturaScripts to a release later than 2025.81 once the maintainer publishes a fixed version.
  • Audit existing product image directories for files with executable extensions and remove any unauthorized artifacts.
  • Rotate credentials for FacturaScripts accounts with upload privileges if compromise is suspected.

Patch Information

Review the FacturaScripts GitHub Security Advisory GHSA-vf3q-frmr-vrr9 for the maintainer's remediation guidance and patched release information.

Workarounds

  • Configure the web server to disable PHP execution within the product image upload directory using directives such as Apache php_flag engine off or an Nginx location block that restricts handlers.
  • Enforce an extension whitelist at a reverse proxy or web application firewall layer to reject uploads ending in .php, .phtml, .phar, or similar.
  • Restrict the product image upload role to a minimum set of trusted users until the patched version is deployed.
bash
# Apache example: disable PHP execution in the uploads directory
<Directory "/var/www/facturascripts/MyFiles/Images/Products">
    php_flag engine off
    AddType text/plain .php .phtml .phar
    Options -ExecCGI
</Directory>

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechFacturascripts

  • SeverityMEDIUM

  • CVSS Score6.3

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-94
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-27891: FacturaScripts Zip Slip RCE Vulnerability

  • CVE-2026-42877: FacturaScripts Stored XSS Vulnerability

  • CVE-2026-42878: FacturaScripts Information Disclosure

  • CVE-2026-27964: FacturaScripts Reflected XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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