Skip to content
CVE-2025-54236CriticalCVSS 9.1Patch

CVE-2025-54236 (SessionReaper) Magento security patch

Free Composer patch for CVE-2025-54236 (SessionReaper) on Magento 2.3 to 2.4.5, which no Adobe release fixes. Tested on eight releases, 2.3.0 to 2.4.9.

  • Updated
  • Maintained by The Big Cart Energy team

Install with Composer

Run it from your Magento root as the file-system owner. Test it on staging first, with a backup you've restored at least once.

Before you install. This patch is free software under OSL-3.0 (opens in a new tab), with no support. Apart from the license's own warranty of provenance, it is provided "AS IS" and WITHOUT WARRANTY, express or implied, and the entire risk as to its quality is with you. It's tested only on the versions listed on this page. Try it on a staging store first and keep a backup you have restored. By installing it you accept our terms and the package's license. Not affiliated with Adobe.

The copy button and the repository link wait for this box.

Locked until you tick “I've read this and I'll test on staging first”.
bash
composer require bigcartenergy/module-sessionreaper-patch

The source and every release live on GitHub: github.com/bigcartenergy/module-sessionreaper-patch

Then enable the module, register it and compile:

bash
bin/magento module:enable BigCartEnergy_SessionReaperPatch
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:clean

setup:di:compile is needed in production mode and does no harm in developer mode. In production mode, setup:upgrade also empties the deployed static files unless you run it with --keep-generated. So either run bin/magento setup:static-content:deploy after the compile, as after any module install, or pass --keep-generated (the module ships no static content) and let setup:di:compile rebuild the generated code.

  • Nothing in the Magento source changes. It's a module, not a .patch file, so no patching tool is involved.
  • No table, setting, menu item, cron job or storefront output, and no dependency on another Big Cart Energy package.
  • It installs side by side with the CosmicSting patch. The two run in a fixed order and don't interfere.
  • The package is on Packagist, so Composer needs no extra repository.
  • No Composer? Download the release archive from the repository: its link sits under the install command above and unlocks once you tick the box. The archive unpacks into one folder named after the repository and the release. Copy that folder's contents, registration.php included, to app/code/BigCartEnergy/SessionReaperPatch, then run the same bin/magento commands.
  • Not sure you need it? Check your release first: Adobe's list starts at 2.4.5, and the code it fixes doesn't.

Check that it's working

bash
bin/magento module:status BigCartEnergy_SessionReaperPatch

It prints "Module is enabled". From then on, each conversion from which the module removed a key writes one line to var/log/bigcartenergy_cve-2025-54236.log, after Magento's own timestamp: the UTC time, the client IP address, the request method and path, the type being built, and the removed parameter names with their types. The request body is never logged.

If the file doesn't exist, nothing has been removed yet. That's the expected state for a store that never receives such a request, not a sign that the guard is off.

Stricter than Adobe's fix: check your integrations

Adobe's fix skips a constructor parameter that fails its allow-list and leaves the key in the data, where the processor's setter fallback can still pick it up. This module removes the key, so it reaches neither the constructor nor a setter. That's its one deliberate difference, and the stricter of the two.

It also means the module isn't silent on a release that already has Adobe's fix. Magento's own API flows ran the same with and without it on every release we tested, but an extension that relies on a setter receiving such a key would see that key dropped. So on staging, after the install:

  • Run every integration that talks to your API: ERP and marketplace syncs, apps, anything that posts to REST or SOAP.
  • Read var/log/bigcartenergy_cve-2025-54236.log. Each line names the type being built and the parameters removed (inside a custom attribute, under that attribute's path), which points straight at the integration to look at.

Logging and IP addresses

Logging is on by default. IP addresses are personal data in the EU, so if your store has no basis to keep them, turn the log off from a small module of your own: the three files below. Turn it off after the staging check above, not before: the log is how you see what the guard removed.

Magento merges every module's etc/di.xml in module load order, and the last value wins. This patch sets enableLog to true in its own etc/di.xml, so yours must load after it, which is what the <sequence> in your module.xml is for. Without that <sequence>, a module whose name sorts before BigCartEnergy loads first, loses the merge, and the log stays on with nothing to tell you. Don't put the override in Magento's app/etc/di.xml either: that file belongs to the magento/magento2-base package and is written over when that package updates.

app/code/Acme/PatchLogOff/registration.php (use your own vendor name in place of Acme):

php
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Acme_PatchLogOff',
    __DIR__
);

app/code/Acme/PatchLogOff/etc/module.xml:

xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Acme_PatchLogOff">
        <sequence>
            <module name="BigCartEnergy_SessionReaperPatch"/>
        </sequence>
    </module>
</config>

app/code/Acme/PatchLogOff/etc/di.xml:

xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="BigCartEnergy\SessionReaperPatch\Plugin\Webapi\ServiceInputProcessorPlugin">
        <arguments>
            <argument name="enableLog" xsi:type="boolean">false</argument>
        </arguments>
    </type>
</config>

Then run bin/magento module:enable Acme_PatchLogOff, bin/magento setup:upgrade, bin/magento setup:di:compile and bin/magento cache:clean; the static-content note at the top of this tab applies here too. Running both of our patches? One module can switch both logs off: list both patch modules in the <sequence> and both plugin types in the di.xml.

Confirm it took. bin/magento module:status lists the enabled modules in load order, and Acme_PatchLogOff must come after BigCartEnergy_SessionReaperPatch; if it comes before, the <sequence> is missing or misspelled and the log is still on. Nothing exposes the switch directly, so the check that settles it is the file: run your store's own API traffic on a staging copy and confirm var/log/bigcartenergy_cve-2025-54236.log gains no line.

The guard works the same with the log off.

How to remove the patch

Same rules as the install: a staging copy first, with a backup.

bash
bin/magento module:disable BigCartEnergy_SessionReaperPatch
composer remove bigcartenergy/module-sessionreaper-patch
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:clean

In production mode, the static-content note at the top of this tab applies to this setup:upgrade too. Nothing is left behind except the log file, which you can delete.

Am I affected?

Adobe's list starts at 2.4.5. The code doesn't. Adobe's hotfix article for bulletin APSB25-88 lists Magento Open Source lines from 2.4.5 up. The code its fix changes is also in Magento Open Source 2.3.0 to 2.4.4, lines that list doesn't name and Adobe no longer patches; 2.3.0's version of it differs in one respect, which the 2.3.0 note below explains. And no patch release of the 2.4.4 or 2.4.5 lines carries the fix.

Read your release from the Magento root:

bash
bin/magento --version

It prints a line such as Magento CLI 2.4.5-p14. A hotfix applied on top of a release doesn't change that line, so if someone may have applied Adobe's, ask whoever deploys the store. Our guide to checking your version and patch level covers the other places to look. Then find your row. We read Adobe's fix in the Magento Open Source code of every release below, so the table says what the code says.

Your Magento Open Source releaseAdobe's fixThis module
2.3.0 to 2.3.7-p4NoneYes
2.4.0 to 2.4.3-p3NoneYes
2.4.4 to 2.4.4-p13, every release of the lineNone that Adobe names: no patch release of the line carries the fix, and Adobe's hotfix article lists Magento Open Source only from 2.4.5Yes
2.4.5 to 2.4.5-p14, every release of the lineAdobe's hotfix VULN-32437 only; no patch release of the line carries the fixYes, unless the hotfix is applied
2.4.6 to 2.4.6-p12, 2.4.7 to 2.4.7-p7, 2.4.8 to 2.4.8-p2The hotfix, or the patch release of your line in the next rowYes, if you've applied neither
2.4.6-p13 and later, 2.4.7-p8 and later, 2.4.8-p3 and later, 2.4.9IncludedNot needed. Installed anyway, it's redundant, and stricter than core (above)

"Yes" means the release needs a fix, not that we tested the module on it: the tested releases are under How we tested it. On our 2.4.9 test install, whose core already has Adobe's fix, every Magento API call behaved the same with and without the module.

Mage-OS ships the same Web API code as the Magento Open Source release it's based on, so that release's row applies to it. We haven't tested this version of the module on Mage-OS.

What SessionReaper is, and how the patch works

SessionReaper (CVE-2025-54236) is an improper input validation flaw in the Magento Web API. Adobe scores it 9.1 out of 10 (CVSS 3.1): an attacker needs no login and no user interaction, and Adobe says a successful attack can take over sessions. Adobe published its fix as a hotfix with bulletin APSB25-88 on September 9, 2025; the fix is also in 2.4.9 and in the patch releases 2.4.8-p3, 2.4.7-p8 and 2.4.6-p13.

It lives in the same class as CosmicSting, Magento\Framework\Webapi\ServiceInputProcessor, which turns a REST or SOAP request body into the objects a service method expects. When it builds an object, it fills the object's constructor parameters from the request data by name, and it accepted parameters of any type. Adobe's fix allows a constructor parameter only when its type is a simple type or an Api\Data type, and skips every other one.

The module is one before plugin on convertValue(), the processor's one public entry point, which the processor also passes through for every nested value. It applies Adobe's allow-list, mirrored character for character, and removes each key that names a constructor parameter outside it. Array types are handled item by item, the SOAP item wrapper included. One value the processor builds without that entry point is an object-typed custom attribute. For those, the module resolves the attribute's type the way the processor does (the entity type of the owning object, then Magento's custom attribute type locator) and applies the allow-list to the attribute's value, or to each item of an array-typed value, so that object's constructor is covered on an unpatched core as it is by Adobe's fix. Simple types, mixed, unstructured arrays and non-array data are never touched, a request from which nothing was removed is handed on untouched, and no core file is edited.

Everything a Magento store legitimately sends over its API passes exactly as on a patched core: custom attributes, extension attributes, search criteria and every Api\Data type, yours included.

On 2.3.0, which copies nested constructor data without converting it, removing the keys that fail the allow-list is what closes that path. A nested Api\Data object can't be built from a request on that release at all, with or without the module. Install the CosmicSting patch alongside it there: together the two cover both paths.

How we tested it

On every release below we ran the same checks, with the module alone and alongside the CosmicSting patch:

  • install and setup:di:compile
  • guest checkout over REST to a placed order, customer sign-up, product search with filters and sort orders, and admin product saves with custom and extension attributes, Magento's own object-typed custom attribute included
  • one SOAP call with search criteria
  • the guard removing a constructor parameter outside Api\Data on a test fixture, with its log line: on a service parameter, over REST (a single object and a list) and over SOAP (both item wrapper shapes), and inside an object-typed custom attribute value of a product save, over REST and SOAP
  • a legitimate custom attribute value saving the same with and without the module
  • removal, then REST again

Every Magento API call returned the same results with the module as without it on every release. The unit suite passes on PHPUnit 6.5, 9, 10 and 12.

ReleasePHPDatabaseOn this release
Magento Open Source 2.4.98.5MySQL 8.4Adobe's fix is in core; the module is redundant and stricter
Magento Open Source 2.4.88.3MySQL 8.4The module is the only guard
Magento Open Source 2.4.78.2MySQL 8.0The module is the only guard
Magento Open Source 2.4.68.1MySQL 8.0The module is the only guard
Magento Open Source 2.4.3-p37.4MySQL 8.0The module is the only guard
Magento Open Source 2.3.7-p47.4MySQL 5.7The module is the only guard
Magento Open Source 2.3.5-p27.3MySQL 5.7The module is the only guard
Magento Open Source 2.3.07.2MySQL 5.7The module is the only guard; see the 2.3.0 note above

We installed 2.3.0 and 2.3.5-p2 from Adobe's public release tags rather than as Composer projects, because the public package mirror serves no 2.3 release before 2.3.7-p2; the code under test is each release's own. A release that isn't in this table hasn't been tested, and we haven't tested this version of the module on Mage-OS. The Tested versions tab carries the same list.

If your store ran an exposed release

A fix acts on requests from the moment it's in place and changes nothing that happened before it. If your store has run an exposed release since the bulletin of September 9, 2025:

  • Rotate the store's encryption keys.
  • Invalidate customer and admin sessions.
  • Review the admin users, integrations and API tokens.

The module does none of that for you. If you think the store has already been hit: Store hacked or down? Get help now.

Patch or upgrade?

A patch buys time. It doesn't buy a supported release. This module closes one hole in a release that Adobe no longer patches; it doesn't fix the others, and it never will. Install it, then plan the upgrade to a supported release of Magento Open Source; our Magento end-of-life guide has Adobe's support dates. Stuck on an old version? We'll patch you now and upgrade you when you're ready.

Want it done for you? It's part of our Magento development work. We install the patch on your staging copy first, run your integrations through it and read the guard's log for anything it removed before the patch goes to production. If the store ran exposed, we rotate the keys, end the old sessions and review the admin users, integrations and tokens with you, then scope the upgrade. Every engagement is scoped in writing, and we don't publish prices; how an engagement runs covers the rest. Talk shop and tell us your release, how you deploy and which systems post to your API.

Stuck on an old version?

We'll patch you now and upgrade you when you're ready.