CVE-2025-46558 org.xwiki.contrib.markdown:syntax-markdown-commonmark12 vulnerable to XSS via Markdown content

Critical 9.1 Published Updated

Attackers can inject JavaScript via Markdown content, leading to XSS and potential full system compromise if executed by privileged users.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-46558?

CVE-2025-46558 is a critical cross-site scripting vulnerability in Xwiki Xwiki, published on 30 Apr 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

XWiki Contrib's Syntax Markdown allows importing Markdown content into wiki pages and creating wiki content in Markdown. In versions starting from 8.2 to before 8.9, the Markdown syntax is vulnerable to cross-site scripting (XSS) through HTML. In particular, using Markdown syntax, it's possible for any user to embed Javascript code that will then be executed on the browser of any other user visiting either the document or the comment that contains it. In the instance that this code is executed by a user with admins or programming rights, this issue compromises the confidentiality, integrity and availability of the whole XWiki installation. This issue has been patched in version 8.9.

Weakness: CWE-79

Which versions are affected by CVE-2025-46558?

2 open source packages ship an affected version, including org.xwiki.contrib.markdown:syntax-markdown-commonmark12. It affects 1 product.

PackageAffectedFixed in
org.xwiki.contrib.markdown:syntax-markdown-commonmark12 MavenFrom 8.28.9
org.xwiki.contrib.markdown:syntax-markdown-commonmark12 MavenFrom 8.28.9

Products include Xwiki Xwiki.

How do I fix CVE-2025-46558?

Upgrade org.xwiki.contrib.markdown:syntax-markdown-commonmark12 to 8.9 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2025-46558 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-46558 exists.

All Xwiki Xwiki vulnerabilities

Sources

Also known as GHSA-8g2j-rhfh-hq3r.

Is CVE-2025-46558 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free