# CVE-2026-77616: Semantic MediaWiki affected by reflected XSS in `Special:Ask` via a forged cursor pagination token

> CVE-2026-77616 (GitHub advisory GHSA-cx86-7xwp-w9wf) is a medium-severity vulnerability with a CVSS 3.1 base score of 6.1, classed as Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (CWE-79), in mediawiki/semantic-media-wiki (Packagist). Affected versions: >= 7.0.0, <= 7.1.0. It is fixed in 7.2.0.

Canonical page: https://cveminer.com/vulnerabilities/CVE-2026-77616

| Field | Value |
| --- | --- |
| CVE | CVE-2026-77616 |
| GHSA | GHSA-cx86-7xwp-w9wf |
| Severity | Medium |
| CVSS 3.1 | 6.1 `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N` (GitHub Advisory Database) |
| CWE | CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') |
| EPSS | 0.2% (higher than 10% of CVEs) |
| CISA KEV | Not listed |
| SSVC | exploitation none, automatable no, technical impact partial |
| Published | 18 Sept 2026 |
| Modified | 18 Sept 2026 |

## Description

#### Reflected XSS via a forged cursor pagination token

###### Failure mode

`Special:Ask` accepts a `cursor` query parameter for keyset pagination (added in 7.0.0). The token is decoded by `CursorEncoder`, which is an **unsigned** base64url-encoded JSON blob, so its contents are fully attacker-controlled. When the cursor's sort anchor does not match the request's `sort=` / `order=`, `QueryCreator::applyCursorIfRequested()` builds an error message by interpolating the attacker-controlled `sort_prop` / `sort_order` values into a raw string via `Query::addErrors()`.

Unlike SMW's message-key errors, this raw string bypasses the message layer's sanitisation (`ProcessingErrorMsgHandler::normalizeAndDecodeMessages()` passes a non-key, non-encoded string through unchanged). `ErrorWidget::queryError()` then assembles the errors and passes them to `Html::errorBox()`, whose first argument is emitted as raw HTML. The result is a reflected cross-site scripting vulnerability: a crafted `cursor` token containing markup in `sort_prop` (or `sort_order`) executes script in the victim's browser on the wiki origin.

No authentication or special permission is required. The payload is delivered via a crafted link, e.g. `Special:Ask?q=...&p[cursor]=<forged token>` where the token decodes to `{"v":1,"sort_prop":"<script>...</script>"}`. Confirmed executing in a browser; the responses carry no Content-Security-Policy, so inline script is not blocked.

###### Remediation

- Output-encode the attacker-controlled `sort_prop` / `sort_order` values before they are interpolated into the error text in `QueryCreator`, so no raw user input enters the error stream.
- Defense in depth: the `format=debug` output path that reflected the same error text was hardened separately in GHSA-q5fm-9mx6-44f4.

###### Maintenance note

Query error strings are rendered as raw HTML by `ErrorWidget::queryError()` via `Html::errorBox()`. Any error added through `Query::addErrors()` that embeds user-controlled text must be output-encoded (or use a message key); pagination and validation error text is attacker-influenced and must not be treated as trusted.

## Affected packages

| Package | Ecosystem | PURL | Vulnerable versions | Fixed in |
| --- | --- | --- | --- | --- |
| mediawiki/semantic-media-wiki | Packagist | `pkg:composer/mediawiki/semantic-media-wiki` | >= 7.0.0, <= 7.1.0 | 7.2.0 |

## Fix commits

- Release: https://github.com/semanticmediawiki/semanticmediawiki/commit/0d11c070bbe64f4425e3ab8be89eefa926dd9e4e (7.2.0)

## Questions

**What is the GHSA ID for CVE-2026-77616?**

GitHub tracks CVE-2026-77616 as GHSA-cx86-7xwp-w9wf.

**What is the CVSS score of CVE-2026-77616?**

CVE-2026-77616 has a CVSS 3.1 base score of 6.1 (Medium), vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.

**Which versions are affected by CVE-2026-77616?**

mediawiki/semantic-media-wiki (Packagist): >= 7.0.0, <= 7.1.0.

**How do I fix CVE-2026-77616?**

Upgrade to 7.2.0 or later.

**What is the Package URL (PURL) for CVE-2026-77616?**

The affected package's PURL is pkg:composer/mediawiki/semantic-media-wiki.

**Is CVE-2026-77616 exploited in the wild?**

CISA's Known Exploited Vulnerabilities catalog doesn't list CVE-2026-77616. That means no confirmed exploitation has been catalogued, not that it is safe to leave unpatched. CISA's SSVC assessment rates exploitation as "none". EPSS estimates a 0.2% chance of exploitation in the next 30 days, higher than 10% of CVEs.

## References

- https://github.com/SemanticMediaWiki/SemanticMediaWiki/security/advisories/GHSA-cx86-7xwp-w9wf (advisory)
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/77xxx/CVE-2026-77616.json (advisory)
- https://nvd.nist.gov/vuln/detail/CVE-2026-77616 (advisory)
- https://github.com/advisories/GHSA-cx86-7xwp-w9wf (advisory)
- https://github.com/SemanticMediaWiki/SemanticMediaWiki (package)
- https://github.com/SemanticMediaWiki/SemanticMediaWiki/releases/tag/7.2.0

---

Source: CVEminer (https://cveminer.com/vulnerabilities/CVE-2026-77616), compiled from OSV (GitHub advisory), GitHub Advisory Database, OSV (CVE record), CVE.org, CISA KEV catalog. OSV and GitHub Advisory Database content is licensed CC BY 4.0.
