← Lab /Security & privacy

Unauthenticated RCE in Magento via sessionConfig savePath (CVE-2025-54236)

An unauthenticated attacker can achieve remote code execution on Magento instances that use file-based session storage by chaining deserialization to control session.save_path.

Security & privacy Assetnote / Searchlight 22 Oct 2025 Attack Prototype evidence

Published as “Magento RCE via Nested Deserialization: CVE-2025-54236”

Why it matters

Magento sites that rely on the default file-based session handler are at risk of unauthenticated remote code execution until the patch is applied.

Summary

The researchers examined the Adobe patch for CVE-2025-54236 and identified a deserialization chain that reaches Magento\Framework\Session\Config::setSavePath, allowing control of the session file path. By sending a crafted API request they trigger an internal server error on vulnerable installations, confirming the exploit works on a locally deployed Magento 2.4 instance with file-based sessions. They also leveraged an unauthenticated file-upload endpoint to write a payload to disk and achieved code execution using phpggc. The evidence is limited to a single lab environment and does not include large-scale real-world testing.

What they found 1

  1. Remote code execution can be achieved by an unauthenticated user on file-based session storage installations.

    “In instances that use file-based session storage, remote code execution can be easily achieved by an unauthenticated user.”

Caveats 1

  • In the case of Redis-backed session storage, this payload won't work.

What’s new here 4

  • Discovered CVE-2025-54236 allowing unauthenticated RCE via sessionConfig savePath manipulation.
  • Mapped a nested deserialization chain from API input to SessionManager configuration.
  • Demonstrated a full exploit that writes and executes a PHP payload using the unauthenticated file-upload endpoint.
  • Provided a reproducible exploit script that combines phpggc payloads with the deserialization chain.

In the news