PatchClock

PHP security digest · 25 Sep 2026

Mediawiki EmbedVideo Extension has stored XSS via malformed src url with $wgEmbedVideoRequireConsent disabled

High CVE-2026-57440

Package
starcitizenwiki/embedvideo
Fixed in
4.1.0
Published
Fri 25 Sep 2026, 16:03 LisbonUpdated Mon 26 Oct 2026, 01:25 Lisbon
Installs on Packagist
14K

In plain words

A user who can edit a wiki page can store malicious JavaScript in an embedded video when $wgEmbedVideoRequireConsent is disabled, which is not the default. The script runs in the wiki's origin for every visitor to that page, without requiring interaction.

Affected versions

PackageAffectedFixed in
starcitizenwiki/embedvideo<= 4.0.04.1.0

Am I affected?

Check composer.lock for starcitizenwiki/embedvideo at version 4.0.0 or earlier. If present, check whether $wgEmbedVideoRequireConsent is set to false and whether pages use the archiveorg, wistia or sharepoint video services, whose ID or URL handling is identified as vulnerable. Version 4.1.0 contains the fix.

What to do

Check which version you have, then update to a fixed release for your branch (4.1.0):

composer show starcitizenwiki/embedvideo | grep versions
composer update starcitizenwiki/embedvideo

If your version constraint in composer.json keeps you below a fixed release, raise it first. Whether your configuration is affected, and the exact version ranges, are in the advisory itself.

The advisory's description

Summary

With $wgEmbedVideoRequireConsent disabled (not the default), the urls for videos are passed into an iframe src attribute without sanitization. When given a malformed url or id, the src attribute can be escaped via double quotes, allowing for html/javascript injection.

Details

The iframe assembled here adds the url from getUrl() as the src without sanitization. The id regex for the archiveorg service and the url regexes for the wistia and sharepoint services allow for double quotes to be introduced.

PoC

Using double quotes, the src attribute can be escaped.

<embedvideo service="archiveorg" id='a" onmouseover="alert(document.domain)" data-x="'></embedvideo>

Impact

When $wgEmbedVideoRequireConsent = false, any user able to edit a page can inject arbitrary JavaScript into an HTML event handler attribute (e.g. onfocus) via parameter. It requires no interaction (autofires via autofocus) and executes in the wiki origin for every visitor to the page.

Weakness: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'); CWE-80 Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS). Reported by andmcadams.

The advisory

From OSV.dev, which gathers the GitHub Advisory Database, FriendsOfPHP and Drupal security advisories; the summary is theirs. The description, affected versions, weakness and credits are from the GitHub Advisory Database (CC BY 4.0). "In plain words", "Am I affected?" and "If you cannot update yet" are based on that advisory, and checked to name no version it does not.