On 2 December 2026, an attacker took over a CubeCart shop without logging in, ran commands on the server, left web shells behind, and then put the shop’s footer text back so nothing looked wrong. The CubeCart vulnerability behind it, GHSA-86w8-pwv3-4vph, affects every release from CubeCart 6.6.0 to 6.8.6, and the fix, CubeCart 6.8.7, shipped the same evening.
In short: GHSA-86w8-pwv3-4vph is a critical pre-authentication PHP object injection flaw in CubeCart’s legacy session decoder that leads to remote code execution. CubeCart, the open-source PHP shopping cart maintained in the GitHub repository cubecart/v6, disclosed it on 2 December 2026 and says it has been exploited in the wild. Every store owner should upgrade to 6.8.7 and then check for planted files.
- What is the CubeCart vulnerability GHSA-86w8-pwv3-4vph?
- When was it disclosed, and is it a zero-day?
- How does the CubeCart RCE work?
- What did the attacker do on 2 December?
- Who is affected and how do you check exposure?
- How do you detect exploitation?
- How do you fix and clean up?
- How does it compare to other recent PHP web app flaws?
- What is still unknown?
- The bottom line
- Sources
What is the CubeCart vulnerability GHSA-86w8-pwv3-4vph?
GHSA-86w8-pwv3-4vph is the GitHub security advisory for a critical flaw in CubeCart 6, rated critical by the project and classed as CWE-502, deserialization of untrusted data. The advisory’s own title describes it as pre-authenticated PHP object injection to RCE via the legacy session decoder.
CubeCart is a PHP e-commerce platform. Its website says it has been around for over 23 years and powers thousands of stores, without giving an exact count. The cubecart/v6 repository had 76 stars and 61 forks on GitHub on 3 December 2026, under the GPL-3.0 licence. Those small numbers say more about how merchants install it (as a downloaded zip) than about how many shops run it.
The same release fixes two more advisories, both found by a researcher who goes by p-w. One is a high-severity SQL injection; the other is a low-severity weakness in digital download links. Neither of those is reported as exploited.
When was it disclosed, and is it a zero-day?
The flaw first became public on 2 December 2026. CubeCart 6.8.7 was released on GitHub at 21:47 UTC that day, and the three advisories were published three to four minutes later. SecurityOnline (Daily CyberSecurity) covered it on 3 December. The searches for this article found no earlier report of the bug.
It qualifies as a zero-day in the plain sense: the advisory says the attack on the 6.7.5 store happened on 2 December, the same day as the release, and the release notes say the critical flaw is “already being used against stores”. The advisory body still reads “Not yet released” under Patches, which suggests it was drafted before 6.8.7 was out. The advisory’s version metadata lists 6.8.7 as the patched version.
How does the CubeCart RCE work?
The bug chains four ordinary pieces of code into remote code execution. This section explains the mechanism at the level defenders need to understand the evidence; it is not a recipe.
Sessions stored by CubeCart itself
Since 6.6.0, CubeCart stores sessions in its own database through classes/session.class.php. When it reads a session back, it first uses PHP’s unserialize() with allowed_classes set to false. Serialization is how PHP turns data into a string and back; with classes disallowed, the string can only become plain values such as text and arrays.
If that strict decode fails, CubeCart falls back to _decodePhpSession(), a function added to read sessions saved in PHP’s older session format. That fallback unserializes each value with every class allowed.
How a visitor forces the fallback
According to the advisory, an anonymous visitor can make the strict decode fail on purpose. CubeCart’s Session::setBack() saves the HTTP Referer header in the session. When the session is written, a helper called sqlSafe() runs stripslashes() over the whole serialized blob, which changes the real length of a string without changing the length the blob claims. The next request’s strict decode sees the mismatch and fails.
The fallback then splits the blob and unserializes text the attacker chose, with all classes allowed. That is PHP object injection: the attacker can make the application build objects of its own classes with attacker-chosen properties.
From an object to a shell
The advisory says a forged Config object’s destructor writes arbitrary store settings to the database. A destructor is a method PHP runs automatically when an object is discarded. The attacker uses it to put a Smarty template into the store_copyright setting, the shop footer text.
CubeCart renders that setting as a Smarty template string. Smarty is the PHP template engine CubeCart uses, and its allowlist of modifiers included filter_var with a callback option, which can call PHP functions. The footer becomes a command runner.
What did the attacker do on 2 December?
The advisory describes one attack, against a store running CubeCart 6.7.5. The attacker rewrote store_copyright, ran commands, wrote web shells into the images/ directory and then restored the original copyright text. A web shell is a script placed on a web server that runs commands on request, so it keeps access open even after the bug is fixed.
Restoring the footer is the detail to remember. It means a store that looks normal in the browser can still be compromised, and it shows the attacker cared about staying unnoticed. The sources do not say who the attacker was, how the store was found, or whether other stores were hit. SecurityOnline repeats the advisory’s account and adds no new victims.
Who is affected and how do you check exposure?
Any CubeCart store running 6.6.0 up to and including 6.8.6 is exposed to the RCE, according to the advisory. The settings write works through Config::$_write_db on 6.6.x and 6.7.x and through Config::$_dirty on 6.8.x, so no branch in that range is safe.
| Advisory | Severity | Login needed | Affected versions | Exploited |
|---|---|---|---|---|
| GHSA-86w8-pwv3-4vph (session RCE) | Critical | No | 6.6.0 to 6.8.6 | Yes, 2 Dec 2026 |
| GHSA-jfqc-r63w-28cp (search SQLi) | High, CVSS 7.5 | No | 6.5.12 to 6.8.6 | Not reported |
| GHSA-q5mc-p7rv-945c (download key) | Low, CVSS 3.7 | No | Up to 6.8.6 | Not reported |
To check a store, read the version in the admin panel or the release files, and compare it with the table. Hosting providers and agencies that manage many shops should inventory all CubeCart installs, because the platform is often deployed by hand and forgotten.
The SQL injection in the same release
GHSA-jfqc-r63w-28cp lets an anonymous visitor inject SQL through the sort field of the public storefront search. The advisory says the sort column name came straight from the request and, when it contained a space or a dot, went into the query unescaped. Blind extraction of customer data, password hashes or API key hashes is possible. SQL injection means smuggling database commands into a query through user input.
The predictable download key
GHSA-q5mc-p7rv-945c covers digital download links. The key was built from an MD5 hash of predictable values plus mt_rand(). The reporter rated it medium; CubeCart lowered it to low (CVSS 3.7), arguing that guessing requires a known order number and a very large number of requests to the live store. Both sides’ views are in the advisory, and the two disagree on how practical the attack is.
How do you detect exploitation?
The advisory and the release notes give enough to hunt even without published indicators. Start with these sources and behaviours.
Log sources and behaviours
- Web server access logs: search Referer and User-Agent values for serialized PHP object markers. The advisory says blocking headers that contain
|O:followed by digits and a colon stops the payload seen in the wild, which makes it a useful search pattern too. - File system: list PHP files under
images/and any other upload or media folder. CubeCart does not need executable PHP there. Compare file times with 2 December 2026 and later. - Database: inspect the
store_copyrightvalue and other store settings in the configuration table for Smarty tags or unexpected changes. Check database audit or binary logs for writes you cannot explain, since the visible footer may have been restored. - Process activity: on Linux hosts, look for shells or system tools started by the PHP-FPM or web server user.
ATT&CK mapping
The advisory publishes no ATT&CK techniques or indicators. Based on the described behaviour, this article maps it as T1190 (Exploit Public-Facing Application), T1505.003 (Server Software Component: Web Shell) and T1070 (Indicator Removal) for restoring the footer text. That mapping is this article’s, not CubeCart’s.
How do you fix and clean up?
Patch first, then assume compromise if the store was exposed on or after 2 December.
- Upgrade to CubeCart 6.8.7. The release notes say to download the CubeCart-6.8.7.zip asset, not the source archives. If you are coming from a release older than 6.8.5, read the 6.8.5 notes first: that release raised the minimum to PHP 8.0.
- If you cannot upgrade today, apply the hotfix. In
Session::_decodePhpSession(), changeallowed_classesfrom true to false. CubeCart says it never stores objects in sessions, so nothing else changes. - Add a temporary filter at the WAF or reverse proxy for serialized object markers in Referer and User-Agent headers. CubeCart itself calls this a stopgap.
- Hunt for web shells in
images/and other writable folders, and remove anything you did not put there. - Review store settings, especially
store_copyright, and compare them against a backup from before 2 December. - Rotate secrets if you find any sign of compromise: database credentials, admin passwords, API keys, payment gateway keys and SMTP credentials stored in the shop.
- Harden further as the advisory suggests: remove
filter_varfrom the Smarty modifier allowlist if you maintain a fork or custom build.
For cleanup thinking, the same lesson applied after the WP Rocket CVE-2026-125812 attacks: updating stops new intrusions, but files already planted stay until someone removes them.
How does it compare to other recent PHP web app flaws?
CubeCart’s bug is closest to phpAfterShell, the PHP session flaw that turns a half-written session into objects. Both abuse session data that gets unserialized more loosely than intended. The difference is that phpAfterShell needed a well-timed interruption and a gadget chain, while CubeCart’s chain was reliable enough to use against a real store.
| Flaw | Product | Login needed | Fix date | Exploitation |
|---|---|---|---|---|
| GHSA-86w8-pwv3-4vph | CubeCart 6.6.0 to 6.8.6 | No | 2 Dec 2026 | Same day as fix |
| CVE-2026-125615 | Movable Type (mt-wizard.cgi) | No | 1 Dec 2026 | Seen by Six Apart |
| CVE-2026-125812 | WP Rocket before 3.24.2 | No | 19 Nov 2026 | From 25 Nov |
| CVE-2026-126714 (phpAfterShell) | PHP files session handler | No | 19 Nov 2026 | None reported at the time |
The Movable Type mt-wizard.cgi flaw is the other close match: an older PHP-era web application, an unauthenticated entry point, and attacks seen by the vendor around the time of the fix. Small platforms with long histories keep producing this pattern, because legacy compatibility code like CubeCart’s old session decoder rarely gets reviewed.
What is still unknown?
Several questions are open as of 3 December 2026.
- How many stores were hit. The advisory describes one store on 6.7.5. No source gives a count of attacked or exposed stores.
- Who the attacker was. No source attributes the attack, and this article does not speculate.
- How the attack was found. The advisory does not say whether the store owner, a host or CubeCart spotted it, or who reported the RCE. The advisory lists no credits.
- CVE numbers. None of the three advisories had a CVE ID on 3 December, so scanners keyed on CVEs may not flag vulnerable stores yet.
- Public exploit code. No public proof of concept for the RCE was found. The SQL injection advisory does include a proof-of-concept outline.
- Severity score. The RCE advisory carries no CVSS score, only the critical label.
The bottom line
The CubeCart vulnerability GHSA-86w8-pwv3-4vph lets anyone on the internet run code on stores from 6.6.0 to 6.8.6, and it was used against a real shop before most owners could have known. Upgrade to 6.8.7 now, then look for web shells in images/ and changed settings, because the known attacker cleaned up the visible traces.
Sources
- GHSA-86w8-pwv3-4vph: pre-authenticated PHP object injection to RCE (cubecart/v6 advisory, via GitHub API)
- GHSA-jfqc-r63w-28cp: unauthenticated SQL injection in storefront search (cubecart/v6 advisory)
- GHSA-q5mc-p7rv-945c: predictable digital-download access key (cubecart/v6 advisory)
- CubeCart 6.8.7 release notes (GitHub)
- CubeCart RCE Flaw Actively Exploited, Patch Now (SecurityOnline, 3 December 2026)
- CubeCart homepage
- cubecart/v6 repository data (GitHub API)
This article is written for defenders and authorised security testers. Only test systems you own or have written permission to assess.