CVE-2026-58032

mw.Api.getErrorMessage() may return injected HTML if used without errorformat=html

Published Jul 1, 2026 CVSS 4.0 · 5.3 Medium EPSS < 1% KEV · Not listed
Description
Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Wikimedia Foundation MediaWiki.

This vulnerability is associated with program files resources/src/mediawiki.Api/index.Js.



This issue affects MediaWiki: from * before 1.46.0, 1.45.4, 1.44.6, 1.43.9.

Analysis

AI-generated

Technical impact

The vulnerability is an improper neutralization of input during web page generation (CWE-79) that allows the function mw.Api.getErrorMessage() to return injected HTML fragments unescaped when the errorformat=html parameter is omitted. This can cause malicious code execution in the context of a victim’s browser when the unescaped error message is rendered in a web page.

Affected Systems

The issue affects the Wikimedia Foundation MediaWiki system. Any installation of MediaWiki prior to release 1.46.0, 1.45.4, 1.44.6, or 1.43.9 is vulnerable.

Risk and Exploitability

The CVSS score of 5.3 indicates a medium severity, and the EPSS score is < 1%, indicating a low probability of exploitation, and it is not listed in the CISA's KEV catalog. Based on the description, it is inferred that the attacker would need to supply a crafted request to the API endpoint that triggers the unescaped error message, which will then be rendered in a user’s browser as HTML. Without mitigations, a malicious actor could inject script payloads that execute in the context of the site with the privileges of the logged‑in user.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to MediaWiki 1.46.0 or any newer release that contains the fix for this cross vulnerability.
  • If an immediate upgrade is not possible, enforce the errorformat=html query parameter on all API calls that could return error messages; this ensures that any output is properly escaped and prevents unescaped HTML from reaching a browser.
  • Audit any custom extensions or scripts that reference mw.Api.getErrorMessage(); confirm that they sanitize output or force the errorformat=html parameter to avoid serving unescaped HTML to visitors.

Generated by OpenCVE AI on August 1, 2026 at 23:18 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DSA Debian DSA DSA-6380-1 mediawiki security update
References
History
Type Values Removed Values Added
First Time appeared Wikimedia
Wikimedia mediawiki
Vendors & Products Wikimedia
Wikimedia mediawiki
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Wikimedia Foundation MediaWiki. This vulnerability is associated with program files resources/src/mediawiki.Api/index.Js. This issue affects MediaWiki: from * before 1.46.0, 1.45.4, 1.44.6, 1.43.9.
Title mw.Api.getErrorMessage() may return injected HTML if used without errorformat=html
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 5.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
wikimedia-foundation
Published
Updated
Nov 17, 2026, 11:22 PM
Reserved
Jun 27, 2026, 1:32 PM
Status
Analyzed
Published
Jul 1, 2026, 4:16 PM
Modified
Nov 18, 2026, 12:18 AM