Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-100376 Overview
CVE-2026-100376 is a Cross-Site Scripting (XSS) vulnerability in the Wikimedia Foundation MediaWiki TemplateSandbox Extension. The flaw stems from improper neutralization of input during web page generation [CWE-79]. Authenticated users with low privileges can inject script content that executes in the browser of other users viewing affected pages.
The vulnerability affects MediaWiki TemplateSandbox Extension versions before 1.46.1, 1.45.5, and 1.43.10. Exploitation requires network access, low privileges, and user interaction.
Critical Impact
Successful exploitation allows attackers to execute arbitrary JavaScript in victim browser sessions, enabling session hijacking, credential theft, and unauthorized actions on behalf of targeted MediaWiki users.
Affected Products
- MediaWiki TemplateSandbox Extension versions before 1.43.10
- MediaWiki TemplateSandbox Extension 1.45.x before 1.45.5
- MediaWiki TemplateSandbox Extension 1.46.x before 1.46.1
Discovery Timeline
- 2026-09-25 - CVE CVE-2026-100376 published to NVD
- 2026-09-28 - Last updated in NVD database
Technical Details for CVE-2026-100376
Vulnerability Analysis
The TemplateSandbox Extension allows MediaWiki editors to preview template changes before saving. The extension fails to properly sanitize user-controlled input before rendering it in the generated page output. Attackers can craft payloads containing JavaScript that the server includes verbatim in HTML responses.
When a victim previews or views the affected content, the injected script executes under the MediaWiki site origin. This grants the attacker access to the victim's session cookies, local storage, and the ability to perform wiki actions as the victim.
Root Cause
The root cause is missing or incomplete output encoding when the TemplateSandbox renders user-supplied template parameters or preview content. Characters with special meaning in HTML contexts, such as <, >, and ", are passed through to the response without contextual escaping. This classifies the issue under [CWE-79]: Improper Neutralization of Input During Web Page Generation.
Attack Vector
Exploitation requires an authenticated account with permission to use the TemplateSandbox preview feature. The attacker submits a template or preview request containing a malicious script payload. When a privileged user, such as an administrator, views the rendered output, the payload executes in their browser.
Typical impact scenarios include session token exfiltration, forced edits, privilege abuse through CSRF-like actions, and redirection to attacker-controlled infrastructure. Review the Wikimedia Phabricator Task T430596 and the associated Wikimedia Gerrit Change Request for the technical fix details.
Detection Methods for CVE-2026-100376
Indicators of Compromise
- Wiki page revisions or TemplateSandbox previews containing <script> tags, inline event handlers such as onerror= or onload=, or javascript: URIs.
- Outbound HTTP requests from user browsers to unexpected domains shortly after loading TemplateSandbox preview pages.
- Unexpected administrative actions or edits originating from privileged accounts after they viewed sandboxed templates.
Detection Strategies
- Audit MediaWiki edit history and TemplateSandbox API requests for payloads containing HTML or JavaScript constructs in template parameters.
- Enable Content Security Policy (CSP) reporting to capture script execution blocked by directives, which can reveal injection attempts.
- Correlate web server access logs for requests to Special:TemplateSandbox or related endpoints with suspicious query parameters.
Monitoring Recommendations
- Monitor MediaWiki authentication logs for session anomalies affecting administrator accounts following template preview activity.
- Track changes to high-privilege user groups and permission assignments that occur without corresponding administrator intent.
- Alert on new or modified JavaScript gadgets, site CSS, or MediaWiki namespace pages that could persist attacker control.
How to Mitigate CVE-2026-100376
Immediate Actions Required
- Upgrade the MediaWiki TemplateSandbox Extension to version 1.46.1, 1.45.5, or 1.43.10 depending on your MediaWiki release branch.
- Restrict the TemplateSandbox usage to trusted editor groups until patching completes.
- Rotate session cookies and force re-authentication for administrators who may have viewed untrusted sandboxed previews.
Patch Information
Wikimedia Foundation released fixes in TemplateSandbox Extension versions 1.46.1, 1.45.5, and 1.43.10. The code change is tracked in the Wikimedia Gerrit Change Request and the issue is documented in Wikimedia Phabricator Task T430596.
Workarounds
- Disable the TemplateSandbox Extension in LocalSettings.php until the patched version is deployed.
- Deploy a strict Content Security Policy that blocks inline scripts and restricts script sources to trusted origins.
- Limit edit and preview permissions on the TemplateSandbox feature to a small set of vetted users via MediaWiki group configuration.
# Disable TemplateSandbox in LocalSettings.php as a temporary workaround
# Comment out or remove the extension loader line:
# wfLoadExtension( 'TemplateSandbox' );
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

