Semantic MediaWiki has a query debug output XSS (`DebugFormatter`)
CVE-2026-77610 (GitHub advisory GHSA-q5fm-9mx6-44f4) 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.1.0. It is fixed in 7.2.0.
Published 18 Sept 2026Updated 18 Sept 2026
- CVE ID
- CVE-2026-77610
- GHSA ID
- GHSA-q5fm-9mx6-44f4
- EPSS
- 0.15%higher than 5% of CVEs
- Weakness (CWE)
- CWE-79Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
- KEV status
- Not in KEV
- Published
- 18 Sept 2026
- Updated
- 18 Sept 2026
- Ecosystem
- Packagist (PHP)
- Assigned by (CNA)
- GitHub_M
Summary
Source: OSV (GitHub advisory)
Query debug output XSS
Failure mode
Semantic MediaWiki's query debug output (format=debug, or the debug request parameter on Special:Ask) is assembled by SMW\Query\DebugFormatter and emitted as raw HTML. Several of its sinks apply no output-context encoding, so attacker-controlled query input is reflected into the page without escaping:
buildHTML()echoes the re-serialized ASK query string escaping only[;<,>,",'pass through.prettifySQL()returns the generated SQL verbatim. Query value literals are inlined into the SQL through the database layer's quoting (SQL-escaping only, no HTML encoding), so markup in a value survives.prettifyExplain()echoesEXPLAINoutput; on PostgreSQL the plan text contains theWHEREliterals.
On Special:Ask the resulting string is concatenated into the page and sent through OutputPage::addHTML, never through the MediaWiki parser or Sanitizer. No special user right is required; an anonymous request suffices.
This is a reflected XSS: the payload is taken from the request and echoed in the same response. Exploitation requires the query condition to target a text/blob-typed property (whose value is re-serialized verbatim); the predefined _txt properties (Text, etc.) that ship on every install satisfy this, so no attacker-created content is needed. Example request:
Special:Ask?q=[[Text::<script>alert(document.domain)</script>]]&debug=1
Remediation
- Apply output-context escaping at the
DebugFormatterboundary. ThebuildHTML()contract already assumes its inputs are HTML-safe, but its callers do not honour that; escape each entry value on emission, and the SQL andEXPLAINstrings before they are wrapped. - Escaping only the query-string echo is insufficient:
prettifySQL()and the "Auxilliary Tables" executed-query text carry the same attacker-controlled literals.
Scope
The prettifySPARQL() sink already encodes < and > and is not affected. The same debug path is also reachable through inline {{#ask:...|format=debug}}, but that output returns into parser context and is sanitized there; the reflected Special:Ask path is the exposed sink.
Relationship to GHSA-5jhc-3j2f-52rv
This issue was identified while splitting the consolidated report GHSA-5jhc-3j2f-52rv into per-vulnerability advisories. It is distinct from the four items in that report (plain table header, sep, SearchByProperty value, open redirect) and from Special:Ask form-input XSS (which is escaped separately).
Technical details
Source: GitHub Advisory Database
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NMedium6.1Base score from GitHub Advisory Database
- Attack Vector AV
- Network
- Attack Complexity AC
- Low
- Privileges Required PR
- None
- User Interaction UI
- Required
- Scope S
- Changed
- Confidentiality C
- Low
- Integrity I
- Low
- Availability A
- None
Affected packages
Source: OSV (GitHub advisory)
- mediawiki/semantic-media-wikiPackagist (PHP)
pkg:composer/mediawiki/semantic-media-wiki- Affected versions
- <= 7.1.0
- Fixed in
- 7.2.0
Show 78 listed versions
- 1.9
- 1.9-RC1
- 1.9.0.1
- 1.9.0.2
- 1.9.1
- 1.9.1.1
- 1.9.2
- 1.9beta1
- 2.0
- 2.0-RC1
- 2.0-RC2
- 2.0-RC3
| Package | Affected versions | Fixed in |
|---|---|---|
mediawiki/semantic-media-wiki Packagist (PHP) pkg:composer/mediawiki/semantic-media-wiki |
Show 78 listed versions
|
|
Fix
Source: OSV (GitHub advisory)
Fix available
Upgrade to 7.2.0 or later.
Release commits
The commits each fixed release tag points at. They usually bump the version rather than contain the fix itself.
Vulnerability intelligence
Root cause analysis
Vulnerable functions
References
Advisories 4
Credits
- krabinareporter
Questions about CVE-2026-77610
- What is the GHSA ID for CVE-2026-77610?
- GitHub tracks CVE-2026-77610 as GHSA-q5fm-9mx6-44f4.
- What is the CVSS score of CVE-2026-77610?
- CVE-2026-77610 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-77610?
- mediawiki/semantic-media-wiki (Packagist): <= 7.1.0.
- How do I fix CVE-2026-77610?
- Upgrade to 7.2.0 or later.
- What is the Package URL (PURL) for CVE-2026-77610?
- The affected package's PURL is pkg:composer/mediawiki/semantic-media-wiki.
- Is CVE-2026-77610 exploited in the wild?
- CISA's Known Exploited Vulnerabilities catalog doesn't list CVE-2026-77610. That means no confirmed exploitation has been catalogued, not that it is safe to leave unpatched. EPSS estimates a 0.15% chance of exploitation in the next 30 days, higher than 5% of CVEs.
Data sources
Upstream records
- OSV (GitHub advisory)LoadedRaw JSON
- GitHub Advisory DatabaseLoadedRaw JSON
- OSV (CVE record)LoadedRaw JSON
- CVE.orgLoaded
- CISA KEV catalogLoaded
Fetched 5 days ago (8 Oct 2026, 17:05 UTC). Records refresh automatically after 24 hours.
Where each part of this page came from
- Title and description
- OSV (GitHub advisory)
- Severity score
- GitHub Advisory Database
- Weakness (CWE)
- GitHub Advisory Database
- Affected packages
- OSV (GitHub advisory)
- Fix
- OSV (GitHub advisory)
- References
- Computed by CVEminer
- KEV status
- CISA KEV catalog
- EPSS
- GitHub Advisory Database
OSV and GitHub Advisory Database content is licensed CC BY 4.0. Values marked as computed or derived were calculated by CVEminer from the upstream data.