79% vs 51%: independent neobanks lag on app security. Read the report

Deep Dive

Deep Dive

MediaWiki Echo Deserialization RCE, Fixed in 1.46.3 (CVE-2026-132726)

MediaWiki's Echo extension unserializes job-supplied event data with no class limit, letting an attacker run PHP; fixed in 1.46.3 and 1.45.7.

TL;DR

  • MediaWiki's Echo extension unserializes legacy event_extra values without limiting PHP classes. A bundled vendor class turns the injected object into a function call.
  • Every MediaWiki release that ships Echo 1.43.0 through 1.43.11, 1.45.0 through 1.45.6 and 1.46.0 through 1.46.2 is affected. The 1.47 development branch is affected too.
  • The CVE record rates CVE-2026-132726 at CVSS v4.0 9.2 Critical. No in-the-wild exploitation is known, and the CVE is not in CISA KEV as of 2026-11-25.
  • Upgrade to MediaWiki 1.43.12, 1.45.7 or 1.46.3, which contain the fixed Echo. See "How do I fix it?" for git checkouts and the narrow interim control.

Am I affected?

You are exposed when a MediaWiki installation runs an affected Echo release and an attacker can control the parameters of an Echo notification job or write the event_extra column. The CVE record gives CVSS v4.0 9.2, CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N.

All of these conditions must hold:

  • The wiki runs MediaWiki with Echo at 1.43.0 through 1.43.11, 1.45.0 through 1.45.6 or 1.46.0 through 1.46.2.
  • Echo is loaded, which the Wikimedia configuration does on every wiki except legalteamwiki and votewiki.
  • An attacker can reach a path that feeds Event::newFromArray() or Event::newFromRow() with bytes they control. The public analysis names job parameters and echo_event rows.
  • On the 1.45 and later branches, a job can be created without an eventId, so its eventData array reaches Event::newFromArray().

Echo is the notifications extension that MediaWiki distributes with its release tarballs. The 1.46.3 tarball contains 797 Echo files, and the extension is enabled by default on Wikimedia's own fleet.

Branch Affected versions Fixed version
MediaWiki 1.43 1.43.0 through 1.43.11 1.43.12
MediaWiki 1.45 1.45.0 through 1.45.6 1.45.7
MediaWiki 1.46 1.46.0 through 1.46.2 1.46.3
MediaWiki 1.47 Development branch Patch merged; no fixed release named

Check the core version and whether Echo is loaded:

grep -n "MW_VERSION" includes/Defines.php
grep -n "wfLoadExtension( 'Echo' )" LocalSettings.php

For a git checkout of the extension, read its last commit date:

git -C extensions/Echo log -1 --format=%cd

How do I fix it?

Upgrade the MediaWiki installation to 1.43.12, 1.45.7 or 1.46.3. Each release carries the Echo branch with the fix.

  1. Back up the database and the LocalSettings.php file.
  2. Replace the installation with the matching release tarball from the MediaWiki download page, or update the core git checkout to the release tag.
  3. Update the Echo extension to the same release line. A tarball already contains it. For a separate git checkout, run:
git -C extensions/Echo fetch origin
git -C extensions/Echo checkout REL1_46
git -C extensions/Echo pull --ff-only

Replace REL1_46 with REL1_43 or REL1_45 on the older branches.

  1. Run the database updater and confirm the new version:
php maintenance/run.php update
grep -n "MW_VERSION" includes/Defines.php

If you cannot upgrade, restrict access to the job runner. On Wikimedia's infrastructure the public analysis reached job parameters through an unsigned RPC endpoint, rpc/RunSingleJob.php, tracked as T441635. Block that endpoint from every client that does not need it and require a signature once the endpoint is fixed. This control does not remove the unsafe unserialize; it removes the easiest way to reach it.

What is the root cause?

Echo stores notification data in an event_extra column. Since MediaWiki 1.45 the column holds JSON, but the code keeps a legacy fallback that accepts PHP's serialize() format. That fallback calls unserialize() without an allowed_classes list.

The vulnerable code is in includes/Model/Event.php. Event::newFromArray() builds an Event from an array, which is the shape a job carries:

public static function newFromArray( $data ) {
    $obj = new self();
    if ( isset( $data['event_id'] ) ) {
        $obj->id = $data['event_id'];
    }
    $obj->type = $data['event_type'];
    $obj->extra = $data['event_extra'] ? self::deserializeExtra( $data['event_extra'] ) : [];

Event::deserializeExtra() decides the format from the first byte. A value that starts with a brace or a bracket is parsed as JSON. Anything else goes to unserialize() with no restrictions:

private static function deserializeExtra( string $serialized ) {
    if ( str_starts_with( $serialized, '{' ) || str_starts_with( $serialized, '[' ) ) {
        $codec = MediaWikiServices::getInstance()->getJsonCodec();
        return $codec->deserialize( $serialized );
    }
    return $serialized ? unserialize( $serialized ) : [];
}

Echo's NotificationJob supplies that value from its own parameters. On the 1.45, 1.46 and 1.47 branches it reads eventData when the job has no eventId:

if ( isset( $this->params['eventId'] ) ) {
    $eventMapper = new EventMapper();
    $event = $eventMapper->fetchById( $this->params['eventId'], true );
} else {
    $event = Event::newFromArray( $this->params['eventData'] );
}

The 1.43 branch keeps the eventId path only, so its exposure runs through Event::newFromRow() and the same legacy branch when an attacker can write echo_event rows.

How is it exploited?

The attack turns a PHP object injection into a call to a function the attacker names. It needs control of the serialized bytes and a class with a useful destructor.

  1. The attacker builds a PHP serialized object whose class is Wikimedia\RequestTimeout\CriticalSectionScope. That class ships in wikimedia/request-timeout version 3.0.0 and is autoloadable on every MediaWiki request.
  2. The attacker sets the private exitCallback property to the name of a PHP function, for example system, and the private id property to the command string.
  3. The attacker places those bytes in a notification job's eventData event_extra value, or in an echo_event row.
  4. EchoNotificationJob runs Event::newFromArray(), and deserializeExtra() calls unserialize() with no allowed_classes list. PHP creates the CriticalSectionScope object.
  5. When the object goes out of scope, CriticalSectionScope::__destruct() calls exit(), which calls the attacker's callable with the attacker's argument.
  6. The named PHP function runs in the job runner process with the job runner's privileges.

The public Phabricator task records the gadget. The class stores two callables and calls one of them from __destruct():

public function __destruct() {
    if ( !$this->hasExited ) {
        $this->exit();
        if ( $this->implicitExitCallback ) {
            ( $this->implicitExitCallback )( $this->id );
        }
    }
}

The task states that the job-forging step was confirmed in production on Wikimedia infrastructure through the unsigned RunSingleJob endpoint, and that the Echo step was proven on a local wiki. It does not report production code execution.

How does the attack flow?

An attacker who can supply a notification job's event data sends a serialized CriticalSectionScope object. Echo unserializes it without a class limit, and the object's destructor calls a function the attacker chose in the job runner.

flowchart LR A["Attacker controls a job's event data"] --> B["EchoNotificationJob builds an Event from eventData"] B --> C["deserializeExtra calls unserialize with no allowed_classes limit"] C --> D["CriticalSectionScope object is created"] D --> E["__destruct calls the attacker's callable"] E --> F["PHP code runs in the job runner"]

What can an attacker do?

An attacker who reaches the unserialize() sink can call any PHP function that takes one argument, with an argument they choose. The function runs as the user that runs the job.

On Wikimedia's cluster, the public analysis places the job runner in the mw-jobrunner pod, which loads the full MediaWiki configuration. That configuration includes database credentials and $wgSecretKey, the key that also signs job events. The task marks those consequences as inferred from the deployment image and configuration, not tested.

On a third-party wiki, the impact depends on how the job runner is deployed. A job runner that shares the web server's PHP-FPM pool gives code execution as the web user. A dedicated runner may hold database credentials and the wiki's secret key.

Several conditions limit the attack:

  • The attacker must control the serialized event_extra bytes.
  • On 1.45 and later, the job must be created without an eventId, because the eventId path fetches a trusted row.
  • On 1.43, the attacker needs a write to the echo_event table or another caller that passes attacker data to newFromArray().
  • The attacker must know or find a class with a useful destructor. The public task names one that ships with MediaWiki.

Why does the fix work?

The fix tells the job path that its data is JSON, so unserialize() may not create objects. Event::newFromArray() now passes false as the second argument, and deserializeExtra() forwards it as allowed_classes:

@@ -249,7 +249,8 @@
            $obj->id = $data['event_id'];
        }
        $obj->type = $data['event_type'];
-       $obj->extra = $data['event_extra'] ? self::deserializeExtra( $data['event_extra'] ) : [];
+       // Job data is JSON. Do not let unserialize() create objects from it.
+       $obj->extra = $data['event_extra'] ? self::deserializeExtra( $data['event_extra'], false ) : [];
@@ -491,14 +492,15 @@
-   private static function deserializeExtra( string $serialized ) {
+   private static function deserializeExtra( string $serialized, bool $allowClasses = true ) {
        if ( str_starts_with( $serialized, '{' ) || str_starts_with( $serialized, '[' ) ) {
            $codec = MediaWikiServices::getInstance()->getJsonCodec();
            return $codec->deserialize( $serialized );
        }
-       return $serialized ? unserialize( $serialized ) : [];
+       return $serialized ? unserialize( $serialized, [ 'allowed_classes' => $allowClasses ] ) : [];
    }

With allowed_classes set to false, PHP returns __PHP_Incomplete_Class objects instead of instantiating the named class. No destructor runs, so the gadget never fires. The added test asserts exactly that difference: a serialized TitleValue stays a TitleValue through newFromRow() and becomes __PHP_Incomplete_Class through newFromArray().

The fix closes the job-parameter path. It leaves the database-row path on allowed_classes true, because echo_event rows are written by trusted code. A wiki that lets an untrusted party write those rows remains exposed through that path.

How do I check if I was compromised?

No indicators of compromise are published. The public analysis names two places where the bytes can enter, so those are the places to review.

Check the job-runner access log for requests to the RPC entry point from hosts that should not send jobs:

grep -i "runsinglejob" /var/log/mediawiki/*.log

Review echo_event rows whose event_extra is not JSON. A legacy serialized row is not proof of an attack, because rows written before 1.45 use that format:

SELECT event_id, event_type, LEFT(event_extra, 80) AS prefix
FROM echo_event
WHERE event_extra IS NOT NULL
  AND event_extra NOT LIKE '{%'
  AND event_extra NOT LIKE '[%';

Look for serialized objects rather than arrays in the returned prefixes, and for rows created after the wiki was upgraded to 1.45 or later. A failed attempt may leave no row and no log entry.

The job queue is the other place to look. MediaWiki stores pending jobs in the job table, and an Echo notification job carries its parameters in the job_params column. A row whose job_cmd names Echo and whose parameters contain a serialized object rather than JSON is worth reading, though normal jobs also carry serialized parameters.

Timeline

  • 2026-10-19: The Wikimedia security team opens Phabricator task T441639 with the root cause and a local reproduction.
  • 2026-11-19: The Echo fix merges to the REL1_43, REL1_45, REL1_46, REL1_47 and master branches.
  • 2026-11-24: The CVE record for CVE-2026-132726 is published with CVSS v4.0 9.2.

The report, the fix and the CVE record span 36 days
Figure 1: Wikimedia reported the flaw on 2026-10-19, merged the fix on 2026-11-19 and published the CVE on 2026-11-24. Source: Phabricator T441639, Gerrit change 1372098 and the CVE record, checked November 25, 2026

FAQ

Is Echo installed on my wiki by default?

Yes, if you run the official MediaWiki release tarball. The 1.46.3 tarball contains the Echo extension, though a wiki still has to load it in LocalSettings.php.

Does the flaw affect MediaWiki 1.43 installations that never create jobs without an eventId?

Yes, but through a different path. On 1.43 the unsafe unserialize remains reachable through Event::newFromRow() if an attacker can write echo_event rows, so the fix is still needed.

Was the flaw exploited in the wild?

No exploitation is publicly reported. The Phabricator task says job forging was confirmed in production on Wikimedia infrastructure and that the Echo step was proven only on a local wiki.

Is a database write enough to exploit it?

Yes, on the branches where newFromRow() reaches the legacy branch. A write to echo_event with a serialized CriticalSectionScope value makes the next read of that row create the object.

Does the patch break notifications that use the legacy format?

No. Rows written before 1.45 still deserialize through newFromRow() with classes allowed. Only job-supplied data loses the ability to create objects.

References

  • Wikimedia Phabricator, "CVE-2026-132726: Echo: legacy event_extra goes to unserialize() with no class limit; a vendor class turns it into PHP code execution in the job runner", 2026-10-19 (checked November 25, 2026)
  • Wikimedia Gerrit, Echo commit 2a6c971c14614ea610829096e6db9409e1df46cc, "SECURITY: Do not unserialize objects from event_extra in jobs", 2026-11-19 (checked November 25, 2026)
  • CVE.org, CVE-2026-132726 record (checked November 25, 2026)
  • MediaWiki, Echo Event.php at the vulnerable parent commit (checked November 25, 2026)
  • MediaWiki, Echo NotificationJob.php on the master branch (checked November 25, 2026)
  • Wikimedia Phabricator, T441635, unsigned job runner endpoint (checked November 25, 2026)
  • Wikimedia, request-timeout CriticalSectionScope.php at v3.0.0 (checked November 25, 2026)
  • MediaWiki, download page for 1.46.3, 1.45.7 and 1.43.12 (checked November 25, 2026)
  • CISA, Known Exploited Vulnerabilities catalog JSON feed, catalogVersion 2026.11.24 (checked November 25, 2026)

Free scan

Scan your own app for free

or book a demo

Keep reading

Related articles

Browse the blog