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-128046 — Differential PoC lab for CVE-2026-128046: unauthenticated .phar upload via OpenMage product File custom options, with check, exploit, probe and mitigation modes. | Kitploit
Tools/GitHubGitHub/googlesky/cve-2026-128046
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration TestingLabs & Practice
GitHubgooglesky/cve-2026-128046

CVE-2026-128046

Differential PoC lab for CVE-2026-128046: unauthenticated .phar upload via OpenMage product File custom options, with check, exploit, probe and mitigation modes.

View Repository
5 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.

    938
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    556
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    352
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    343
  • 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.

    336
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    291

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-128046 — OpenMage protected_extensions Omits phar/php8/phps: Guest Custom-Option Upload RCE

License: MIT Research status: validated

CVECVE-2026-128046 (GHSA-4fxg-469f-r6fc, High 8.1 CVSS v3.1)
ComponentOpenMage LTS — Mage_Catalog_Model_Product_Option_Type_File::_validateUploadedFile() and general/file/protected_extensions
Affected< 20.18.2, 21.0.0-beta1–beta2 (and everything before 20.17.0 via forbidden_extensions only)
Fixed in20.18.2 / 20.19.0 / 21.0.0-beta3
CWECWE-434 (Unrestricted Upload of File with Dangerous Type), CWE-184 (Incomplete List of Disallowed Inputs)
ImpactAn unauthenticated visitor uploads a .phar through a product File custom option and executes it by fetching its predictable media path — full application-server compromise where the web server maps .phar to PHP and serves media/custom_options/
VectorStorefront add-to-cart with a File custom option (no account required)
TriggerUpload with extension .phar (also .php8, .phps) accepted by the blocklist; served path media/custom_options/quote/<c1>/<c2>/<md5>.phar
Creditvilaysone (missing extensions, via HackerOne), @arpitjain099 (guest route), @4n86rakam1 (code execution on a distribution-default Apache stack); fix by @colinmollenhour, reviewed by @Hanmac

The default upload blocklist general/file/protected_extensions covered php through php7, pht and phtml — but not phar, php8 or phps. Since a product File custom option with an empty allowed-extension list (the default) accepts any guest upload, an unauthenticated visitor can store a .phar at a fully predictable path and fetch it. Where the web server maps .phar to the PHP handler and serves media/custom_options/ — nginx always ignores the directory's .htaccess; Debian/Ubuntu Apache maps .phar by default — the fetch executes the file. This lab reproduces the complete chain against source builds of v20.18.0 (vulnerable) and v20.18.2 (fixed) behind an nginx tier that models exactly that configuration: the vulnerable build accepts the guest .phar upload and serves it executed to an unauthenticated fetcher; the fixed build rejects the upload outright.

1. Root cause

_validateUploadedFile() rejects storefront uploads whose extension is in the general/file/protected_extensions config list (or the store-level catalog/custom_options/forbidden_extensions). That list protected php–php7, pht, phtml and others but omitted phar, php8 and phps. The upload path is deterministic:

$fileName = Mage_Core_Model_File_Uploader::getCorrectFileName($fileInfo['name']);
$dispersion = Mage_Core_Model_File_Uploader::getDispretionPath($fileName);
$filePath = $dispersion;
$fileHash = md5(file_get_contents($fileInfo['tmp_name']));
$filePath .= DS . $fileHash . '.' . $extension;
$fileFullPath = $this->getQuoteTargetDir() . $filePath;

— i.e. media/custom_options/quote/<first char of name>/<second char of name>/<md5(content)>.<ext> (the dispersion characters are the file name's own first two characters: shell.phar → s/h/…). Every term is known to the uploader before the request.

The media/custom_options/.htaccess that would block Apache stacks only ships with fixed releases (before, it was written on the first upload), nginx ignores .htaccess entirely, and Debian/Ubuntu libapache2-mod-php maps .phar to the PHP handler by default. The violated invariant: the blocklist must include every extension the PHP handler executes.

2. Reproduction environment

serviceimagerole
dbmariadb:10.11shared site databases
openmage-vulnsource build of v20.18.0vulnerable side
openmage-fixedsource build of v20.18.2fixed side
poc—stdlib Python driver

Both OpenMage builds are built from the official release tags (composer install + the CLI installer with automatic database setup). A synthetic product with a File custom option (allowed-extension list empty) is seeded into each database by the image entrypoint. The nginx tier serves /media/ — including custom_options, with no .htaccess support — and maps .php/.phar to PHP-FPM, which is the advisory's exploitation precondition (AC:H). Every container is CPU/memory bounded on the isolated cve128046lab network.

3. Running the environment

./run-lab.sh build     # both OpenMage source builds + PoC runner (~minutes)
./run-lab.sh sweep     # exploit / probe / mitigation / check (restarts vuln for clean runs)
./run-lab.sh down

Single mode:

podman run --rm --network=cve128046lab cve-2026-128046-poc:local exploit

4. The PoC

poc/poc.py — stdlib-only Python, four modes:

modepurpose
checkclassify one target: guest upload of the canary .phar + unauthenticated fetch of the predicted path (one canary cart item; documented side effect)
exploitfull differential: the vulnerable build must accept the upload and serve it executed; the fixed build must reject it (no file stored)
probeextension inventory: .php/.php5/.pht/.phtml rejected (legacy blocklist holds) while .phar/.php8/.phps are stored and served through the PHP handler — matching the advisory's exact gap
mitigationthe published workarounds: upgrade (fixed build rejects the upload), server-side deny of /media/custom_options/, no .phar handler mapping, explicit allowed-extension list on the custom option

Exit codes: 0 safe / workaround validated, 1 vulnerable, 2 target unreachable, 3 inconclusive, 4 internal error.

The storage path is computed before the request from the advisory's own formula (dispersion = the file name's first two characters; file name = md5 of the content), so the fetch needs no discovery step.

5. Expected results

reproduction pathvulnerable v20.18.0fixed v20.18.2evidence
guest add-to-cart upload of shell.pharaccepted; stored at media/custom_options/quote/s/h/<md5>.pharrejected — no file stored, cart emptyevidence/poc-exploit.txt
unauthenticated fetch of the predicted path200 — PHP executed, body POC-RCE-MARKER-128046[vuln]404 (File not found.)evidence/poc-exploit.txt
extension inventory (.php .php5 .pht .phtml)rejected — legacy blocklist holds—evidence/poc-probe.txt
extension inventory (.phar .php8 .phps)stored and served through the PHP handler—evidence/poc-probe.txt
mitigation (upgrade)—upload rejected; chain closedevidence/poc-mitigation.txt

6. Environment preconditions

  • Podman with podman compose; --cpus 2 --memory 4g per container; isolated cve128046lab network.
  • Outbound network during the image build (git clone of the release tag + composer dependencies).
  • First boot runs the OpenMage CLI installer (~1–2 minutes per side); the PoC polls the storefront until ready.
  • The web-tier configuration (.phar handler + serving /media/) is the advisory's AC:H precondition and is provided by the lab's nginx tier.

7. Additional findings (0-day sweep)

Download Tool