Skip to content

Semantic MediaWiki server-side boundary wave

Sources: GitHub Security Advisories published 2026-09-18T16:40-16:59Z (one 10-advisory Semantic MediaWiki wave; the stored data-subtab XSS from the same product family is covered on the media client-side render sinks page).

The durable lesson: every alternate programmatic surface (API module, debug format, raw output mode, pagination token, checksum-gated state) is a separate trust boundary that must be tested even when the human-facing feature is locked down or escaped.

Why this is worth an operator pattern

  • API module vs Special page authorization parity. api.php?action=smwtask runs admin-only maintenance tasks (table-statistics, duplicate-lookup, insert-job, update, check-query, run-joblist) while the equivalent Special:SMWAdmin UI requires smw-admin. The module's only gates were needsToken('csrf') + mustBePosted(), and MediaWiki hands anonymous users the fixed public CSRF token +\, so a token check is not an authorization check. Reusable sweep: for every privileged Special page or admin UI on any platform, enumerate api.php?action=* (or the REST equivalent) for modules that back the same operations and diff the permission gates; run the read tasks anonymously as a state oracle and note that insert-job + smw.entityIdDisposer with a chosen id turns disclosure into targeted mutation of stored data.
  • Unsigned "opaque" tokens are attacker-controlled input. The Special:Ask cursor is base64url JSON with no signature, decode, edit sort_prop/sort_order, re-encode. When the anchor mismatches the request sort=, the error text interpolates those values into a raw string that bypasses the message-layer sanitizer and lands in Html::errorBox() raw. Rule: any pagination/state/cursor/token that decodes to readable JSON/JWT-without-verification is a reflected-XSS candidate at every sink that echoes its fields into error paths.
  • Checksum gates are compute-and-bypass controls. Special:FacetedSearch only preserves cstate when csum == crc32(q) (or filtered=1). Both are trivially computable client-side (crc32 of your own q), so the "gate" filters nobody. Whenever a request parameter survives only if it satisfies a deterministic function of other attacker-controlled parameters, compute the function and pass the gate.
  • Debug/verbose output paths are forgotten XSS sinks. format=debug echoes the re-serialized query (escaping only [), the generated SQL verbatim (SQL-quoted ≠ HTML-escaped), and EXPLAIN plan text containing the value literals, as raw addHTML, never through the parser sanitizer. On MediaWiki-family and any query UI: request format=debug/debug=1/trace/verbose variants with an inert markup canary in a text-typed property value, on both the special page and any inline-parser context (the inline {{#ask|format=debug}} leg was safe here because output re-enters the sanitizer, the special-page leg was not).
  • Raw/alternate output modes double the sink count. The sep injection was reachable through standard render and request_type=raw; test every output-format parameter variant (format=raw/json/csv/debug) as its own render pipeline.
  • Redirect validation belongs at the sink. Special:URIResolver 303-redirected to a title resolved from a user-controlled subpage without host checks; an interwiki prefix (Special:URIResolver/mw:Foo) hops off-host from a trusted wiki URL. Always re-validate the final target URL (host + no userinfo component), not the input path, and sweep interwiki/alias-prefix resolution as an off-host channel.

Validation workflow (authorized scope only)

Lab wiki, anonymous read-only proofs, inert canaries

Run against a lab or explicitly authorized Semantic MediaWiki / MediaWiki target. All proofs below are anonymous or low-privilege; use inert DOM markers (<img src=x onerror="window.__canary=1">-style) and no network callbacks.

  1. API parity sweep: enumerate api.php?action=* modules (action=query&meta=siteinfosiprop=apimodules) and fingerprint SMW (action=smwtask,smwprops, etc.). For each module backing an admin UI feature, replay it anonymously with the public token+`: curl -s 'HOST/api.php?action=query&meta=tokens&type=csrf&format=json' then POST action=smwtask&task=table-statistics&token=+\. HTTP 200 with store statistics = authorization-parity finding; record the task list you reached. Do not run insert-job/run-joblist beyond a single benign enqueue in a lab, and never against production wikis.
  2. Cursor-token XSS: fetch a normal Special:Ask pagination cursor, base64url-decode it, set sort_prop to an inert structural marker, re-encode, submit with mismatched sort=; diff submitted → served bytes → parsed DOM (no CSP means inline markup survives here).
  3. Debug sink: Special:Ask?q=[[Text::<inert-marker>]]&debug=1 as anonymous; check all three echo legs (query string, prettified SQL, EXPLAIN), escaping one sink is not escaping the path.
  4. Checksum gate: pick q, compute csum=crc32(q) in any language (or just send filtered=1), inject an inert marker into cstate[0], confirm raw mustache {{{hidden}}} output.
  5. Redirect + separator controls: resolve Special:URIResolver/<interwiki>:Foo and observe 303 off-host with a user-info-bearing target rejected post-fix; re-request a table query with sep set to a marker and with request_type=raw.
  6. Version control: patched release must return 403/permission errors for smwtask and encode all marker legs.

Reporting checklist

  • State the anonymous-token detail explicitly (+\ fixed public CSRF token), it preempts the "but a token was required" triage dismissal.
  • Separate the classes: missing authorization (smwtask, CVSS 7.3, state-changing), reflected XSS (cursor, debug, cstate, sep, headers, SearchByProperty, note absence of CSP), open redirect (URIResolver).
  • For smwtask, name the reachable tasks and the disclosure→mutation bridge (object-ID enumeration via duplicate-lookup feeding entityIdDisposer id parameter).
  • Cite the sink chain (Query::addErrors() → ErrorWidget::queryError() → Html::errorBox() raw), error-path text is attacker-influenced and must not be treated as trusted.

October 23 follow-up: BlueSpice (MediaWiki platform), empty-string config fails the IP gate open, REST endpoints skip the UI's permission check

Two BlueSpice advisories published 2026-10-23T09:31Z extend the same MediaWiki-family axis:

Operator rules reinforced:

  1. Empty-container semantics battery on every config gate. A restriction list that is empty because "not configured" must be probed: does empty mean allow-all (here it did) or deny-all? Send the unconfigured-default shape (no env var, empty string, empty array) against any CIDR/allowlist/domain gate before testing injection against it. Container images make this worse: the shipped LocalSettings.php default, not the upstream extension default, is what runs.
  2. Token-forge ladder on wikis: anonymous read → REST application token → sysop session is the highest-ladder anonymous finding in this product family; on any BlueSpice/MediaWiki deploy, request the service-token endpoint from a non-container-network source as the negative control.
  3. Extension REST endpoints are a separate authorization surface from the Special-page UI, same API-parity rule as api.php?action=smwtask above: block/unblock reached via /bs-usermanager/v1/* with a base-user token is the proof shape (block a disposable account, then unblock; also a lockout-admin DoS primitive).
  4. Image-republish fix dates: BlueSpice 5.2.7 "fixed" only in images rebuilt after 2026-10-19 15:37 UTC, pull-time fingerprinting (image digest/created timestamp) beats version tags when validating this band.

October 27 follow-up: SMW second wave (22 GHSAs, ≤7.3.1), the admin page mints the victim's CSRF token itself, annotation writes carry privileges, and serialized task parameters

Same-product re-sweep pays again (second SMW wave, Sept 18 → Oct 27). New axes from the 2026-10-27T12:30Z batch; the smwtask authorization legs (4cv4/116890, fmrr/116873, anonymous +\ token + run-joblist/update) are this page's original finding re-listed with CVEs, and the sep-separator XSS (wqq7/116875) is the 7xv3 leg re-listed:

  • Self-defeating CSRF defense (GHSA-43rh-jg3g-4j37 / CVE-2026-116880, high): Special:SMWAdmin overwrites wpEditToken with a freshly generated valid token on render, so a cross-site form POSTed from the victim's own session always carries a currently-valid token. Token-refresh-on-GET inside the protected feature is the anti-pattern, the defense re-issues what the check demands. Probe battery: for every CSRF-guarded action, check whether any same-feature GET (the form itself, a settings render, an error page) regenerates and embeds a live token the attacker's auto-submitted form can read or inherit; MediaWiki's editToken re-issue semantics make this reproducible on any extension page.
  • Annotation writes apply privileged effects with no rights check (GHSA-p662-q5fq-6fm5 / CVE-2026-116876, high): ordinary editors permanently protect pages by adding an Is edit protected annotation, EditProtectionUpdater (with $smwgEditProtectionRight enabled) enforces the flag but never checks the writer's right. SMW's whole model is "semantic data drives behavior," so every annotation consumed as a control input is an authorization surface: enumerate annotations that gate protection, display, or workflow and test writes from the lowest role. Generalizes to any property/label/flag-as-policy system (labels→RBAC, tags→workflow): the setter and the effect's required privilege must be diffed.
  • Serialized parameters in API task modules (GHSA-562p-4gfm-c22f / CVE-2026-116879, medium): the smwtask update task accepts a serialized subject parameter for arbitrary/restricted pages, edit-rights users force reparsing and store writes on objects they cannot edit. When a task parameter is PHP-serialized, decode it, swap the target reference, re-serialize; the task runner trusts whatever the blob names.
  • Unauthenticated CPU amplification trio (22p9/116872 in:(...)/has:(...) term-count quadratic in TermParser::normalize_compact_form(); p6m4/116871 nested query tokens parsed before depth limits apply in LegacyParser::getSubqueryDescription(); xjgm/116878 limit=0 on Special:PropertyLabelSimilarity disables the SQL LIMIT and runs pairwise similar_text()): fingerprint = limits enforced after the expensive phase, and 0 meaning "no limit" instead of "none". Cheap anonymous DoS triage for any query engine: zero-limit, deep-nesting, and repeated-term shapes.
  • Dataset→innerHTML client sinks: stored XSS via data-content/data-title on .smw-highlighter spans rendered with tippy allowHTML (h32m/116884), and raw PValueLookup API values concatenated via container.html() in property-value autocomplete (g72f/116881), hover/autocomplete carriers where the victim is whoever opens the widget (admins included); plus one more reflected leg where ProfileForm::profile_sheet echoes the search parameter into a raw <pre> (xq8g/116892). Same page rule as the original data-subtab finding: every data-* attribute the client JS re-serializes as HTML is a stored-XSS sink, grep for allowHTML, .html(, innerHTML against dataset reads.

Related pages: Semantic MediaWiki stored data-* client-side sink (same product, opposite half: front-end dataset sink), the Sept 18 Nextcloud app-layer authority drift (REST-vs-alternate-transport authorization parity is the same axis), and the Sept 16 sanitizer-gap page.