GHSA-8g2j-rhfh-hq3r

Suggest an improvement
Source
https://github.com/advisories/GHSA-8g2j-rhfh-hq3r
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/04/GHSA-8g2j-rhfh-hq3r/GHSA-8g2j-rhfh-hq3r.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-8g2j-rhfh-hq3r
Aliases
Published
2025-04-30T16:53:27Z
Modified
2025-05-01T13:30:39Z
Severity
  • 9.0 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H CVSS Calculator
Summary
org.xwiki.contrib.markdown:syntax-markdown-commonmark12 vulnerable to XSS via Markdown content
Details

Impact

The Markdown syntax is vulnerable to 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.

To reproduce, on an instance where the CommonMark Markdown Syntax 1.2 extension is installed, log in as a user without script rights. Edit a document and set its syntax to Markdown. Then , add the content <script>alert("XSS")</script> and refresh the page. If an alert appears containing "XSS", then the instance is vulnerable.

Patches

This has been patched in version 8.9 of the CommonMark Markdown Syntax 1.2 extension.

Workarounds

We're not aware of any workaround except upgrading.

References

  • https://jira.xwiki.org/browse/MARKDOWN-80
  • https://github.com/xwiki-contrib/syntax-markdown/commit/d136472d6e8a47981a0ede420a9096f88ffa5035
Database specific
{
    "nvd_published_at": "2025-04-30T19:15:55Z",
    "cwe_ids": [
        "CWE-79"
    ],
    "severity": "CRITICAL",
    "github_reviewed": true,
    "github_reviewed_at": "2025-04-30T16:53:27Z"
}
References

Affected packages

Maven / org.xwiki.contrib.markdown:syntax-markdown-commonmark12

Package

Name
org.xwiki.contrib.markdown:syntax-markdown-commonmark12
View open source insights on deps.dev
Purl
pkg:maven/org.xwiki.contrib.markdown/syntax-markdown-commonmark12

Affected ranges

Type
ECOSYSTEM
Events
Introduced
8.2
Fixed
8.9