CVE-2026-27891: Facturascripts/facturascripts Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-3pgc-xqg9-cfr6
CVSS 7.2
CWE-20 CWE-434
Published
Advisory Summary

CVE-2026-27891 is a HIGH (CVSS 7.2) remote code execution vulnerability (CWE-20: Improper Input Validation) affecting Facturascripts/facturascripts libraries in the Packagist ecosystem. The issue involves facturascripts vulnerable to remote code execution (rce) via zip slip in plugin upload mechanism. Remediation is available in the latest vendor maintenance releases.

CVE-2026-27891 at a Glance

CVE Identifier CVE-2026-27891
GHSA Identifier GHSA-3pgc-xqg9-cfr6
Severity HIGH
CVSS v3.1 Base Score 7.2
CWE Classification CWE-20: Improper Input Validation
Affected Product Facturascripts/facturascripts
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-27891

To remediate this vulnerability, upgrade all affected Facturascripts/facturascripts dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

facturascripts/facturascripts fixed: Latest secure release
Upgrade facturascripts/facturascripts to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for facturascripts/facturascripts

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-27891, inspect your project dependencies for Facturascripts/facturascripts:

inspect dependencies for facturascripts/facturascripts

Analyze the terminal output to locate any version of Facturascripts/facturascripts in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Facturascripts/facturascripts, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary A Critical vulnerability exists in the `Plugins::add()` function. The system fails to properly validate the file paths within uploaded ZIP archives. This allows an attacker to perform a Zip Slip attack, leading to Arbitrary File Write and Remote Code Execution (RCE) by overwriting sensitive .php files outside the designated plugins directory. ### Details The vulnerability is located in Plugins.php. While the `testZipFile` function attempts to validate that the ZIP contains only one root folder, it does not sanitize or validate the individual file paths within that folder. ```js // Vulnerable logic in Plugins.php for ($index = 0; $index < $zipFile->numFiles; $index++) { $data = $zipFile->statIndex($index); $path = explode('/', $data['name']); if (count($path) > 1) { $folders[$path[0]] = $path[0]; } } ``` An attacker can bypass this check by naming a file `ValidPluginName/../../shell.php`. The explode function will see ValidPluginName as the root folder, satisfying the `count($folders) != 1` check. However, during extraction, the `../../` sequence triggers a path traversal, allowing the file to be written anywhere the web server has permissions the root directory. ### PoC Prepare Malicious ZIP: Use a tool (like evilarc) or a script to create a ZIP file where one of the entries is named: `MyPlugin/../../rce.php` Inject Payload: Inside rce.php, put a simple shell: `<?php system($_GET['cmd']); ?>` Upload: Navigate to the "Add Plugin" section in FacturaScripts and upload the malicious ZIP. Execution: Access the shell via https://target.com/rce.php?cmd=whoami. ### Impact Confidentiality: High (Attacker can read all database configs and files). Integrity: High (Attacker can modify any file on the server). Availability: High (Attacker can delete the entire installation). > https://github.com/ZeroXJacks/CVEs/blob/main/2026/CVE-2026-27891.md

CVE-2026-27891 Affected Facturascripts/facturascripts Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
facturascripts/facturascripts
Packagist
≤ 2025.71

References

Frequently Asked Questions

What is CVE-2026-27891?
CVE-2026-27891 is a security vulnerability in Facturascripts/facturascripts involving FacturaScripts Vulnerable to Remote Code Execution (RCE) via Zip Slip in Plugin Upload Mechanism under CWE-20: Improper Input Validation.
Which Facturascripts/facturascripts versions are affected?
Affected versions include releases prior to current release patches across affected packages: facturascripts/facturascripts.
What version fixes CVE-2026-27891?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is facturascripts/facturascripts affected?
Yes, facturascripts/facturascripts is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-27891?
CVE-2026-27891 has a CVSS v3.1 base score of 7.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-27891?
CVE-2026-27891 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check Packagist dependencies for CVE-2026-27891?
Run the dependency tree command: 'inspect dependencies for facturascripts/facturascripts'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3pgc-xqg9-cfr6",
  "modified" : "2026-05-07T19:32:14Z",
  "published" : "2026-05-07T19:32:14Z",
  "aliases" : [ "CVE-2026-27891" ],
  "summary" : "FacturaScripts Vulnerable to Remote Code Execution (RCE) via Zip Slip in Plugin Upload Mechanism",
  "details" : "### Summary\nA Critical vulnerability exists in the `Plugins::add()` function. The system fails to properly validate the file paths within uploaded ZIP archives. This allows an attacker to perform a Zip Slip attack, leading to Arbitrary File Write and Remote Code Execution (RCE) by overwriting sensitive .php files outside the designated plugins directory.\n\n### Details\nThe vulnerability is located in Plugins.php. While the `testZipFile` function attempts to validate that the ZIP contains only one root folder, it does not sanitize or validate the individual file paths within that folder.\n```js\n// Vulnerable logic in Plugins.php\nfor ($index = 0; $index < $zipFile->numFiles; $index++) {\n    $data = $zipFile->statIndex($index);\n    $path = explode('/', $data['name']);\n    if (count($path) > 1) {\n        $folders[$path[0]] = $path[0];\n    }\n} \n```\nAn attacker can bypass this check by naming a file `ValidPluginName/../../shell.php`. The explode function will see ValidPluginName as the root folder, satisfying the `count($folders) != 1` check. However, during extraction, the `../../` sequence triggers a path traversal, allowing the file to be written anywhere the web server has permissions the root directory.\n### PoC\nPrepare Malicious ZIP: Use a tool (like evilarc) or a script to create a ZIP file where one of the entries is named: `MyPlugin/../../rce.php`\nInject Payload: Inside rce.php, put a simple shell: \n`<?php system($_GET['cmd']); ?>`\nUpload: Navigate to the \"Add Plugin\" section in FacturaScripts and upload the malicious ZIP.\nExecution: Access the shell via https://target.com/rce.php?cmd=whoami.\n\n### Impact\nConfidentiality: High (Attacker can read all database configs and files).\nIntegrity: High (Attacker can modify any file on the server).\nAvailability: High (Attacker can delete the entire installation).\n> https://github.com/ZeroXJacks/CVEs/blob/main/2026/CVE-2026-27891.md",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "facturascripts/facturascripts"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2025.71"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/NeoRazorX/facturascripts/security/advisories/GHSA-3pgc-xqg9-cfr6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/NeoRazorX/facturascripts"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-434" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-07T19:32:14Z",
    "nvd_published_at" : null
  }
}