PatchClock

PHP security digest · 18 Sep 2026

Semantic MediaWiki affected by Special:Ask table `sep` parameter reflected XSS

Medium CVE-2026-77607

Package
mediawiki/semantic-media-wiki
Fixed in
7.2.0
Published
Fri 18 Sep 2026, 17:50 LisbonUpdated Mon 26 Oct 2026, 00:26 Lisbon
Installs on Packagist
405K

In plain words

An unauthenticated attacker can inject HTML or script through the sep separator used in Special:Ask table output. The flaw affects both the standard page output and raw output requested with request_type=raw.

Affected versions

PackageAffectedFixed in
mediawiki/semantic-media-wiki<= 7.1.07.2.0

Am I affected?

Look for mediawiki/semantic-media-wiki in composer.lock. Versions <= 7.1.0 are affected; 7.2.0 contains the fix. Check whether your site exposes Special:Ask table output, including request_type=raw, where the sep parameter controls the separator between a cell's values. Authentication is not required to reach the vulnerable output.

What to do

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

composer show mediawiki/semantic-media-wiki | grep versions
composer update mediawiki/semantic-media-wiki

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

Failure mode

sep was inserted verbatim into the HTML that joins a table cell's values. This made it possible to inject HTML through the separator value. The same unsanitised table HTML is produced both for the standard Special:Ask render and for its raw request output (request_type=raw), so the injection was reachable without authentication.

Remediation

  • In all non-wiki output modes (HTML, raw request, file), sep is escaped unless it is a safe <br> variant.
  • This preserves legitimate line-break separators while blocking markup injection.

Maintenance note

If the table renderer ever gains richer separator semantics, keep the whitelist explicit. Do not expand the allowed HTML surface casually.

Weakness: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). Reported by krabina.

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.