GIVE YOUR AGENT THE EVIDENCE

Set up in your agent.

One prompt to get started. Paste it into your coding agent to connect cve.new through MCP and bring vulnerability context into your workflow.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GIVE YOUR AGENT THE EVIDENCE

Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GHSA-hg8h-557g-q8pphigh8.6

Semantic MediaWiki vulnerable to stored XSS through wikitext via improper use of non-reserved data attributes

Check your stack

The advisory, in context

Summary

The SemanticMediaWiki extension inserts the unsanitized value of a data attribute into the DOM as HTML, allowing for stored XSS through wikitext.

Details

In ext.smw.js, the data-subtab attribute of all elements with the smw-subtab class is parsed as JSON and appended to the innerHTML of the element: https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/62f1fa765b626e21d88999b97a3e8029db9fd385/res/smw/ext.smw.js#L37-L42 However, most data attributes (except for reserved ones) like data-subtab can be used in wikitext. Therefore, it is possible to insert arbitrary HTML and JS through wikitext. The decoded (" will turn to &quot;, but it will be decoded when it is retrieved through .dataset) value of the data-subtab attribute in the payload is "<img src='' onerror=alert(1)>". This is valid JSON and returns a string with <img src='' onerror=alert(1)> when being decoded.

PoC

  1. Create a page with the following contents:
{{#tag:div|
|class=smw-subtab
|data-subtab=""<img src='' onerror=alert(1)>""
}}
  1. Visit the page

<img width="991" height="465" alt="image" src="https://github.com/user-attachments/assets/5d28d852-72d6-41dc-a59a-faac1610015f" /> <img width="497" height="69" alt="image" src="https://github.com/user-attachments/assets/02309390-0b40-46d9-b690-de8cd25dba59" />

Impact

Arbitrary HTML can be inserted into the DOM by any user with the edit right, allowing for JavaScript to be executed.

Affected packages

Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.

Ecosystem versions

From 3.1.0 before 7.0.0

Fixed in 7.0.0

27 explicitly affected versions

3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.2.0, 3.2.0-rc.1, 3.2.0-rc.2, 3.2.1, 3.2.2, 3.2.3, 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.2.0, 5.0.0, 5.0.1, 5.0.2, 5.1.0, 6.0.0, 6.0.1

View affected-version evidence
{
  "ranges": [
    {
      "events": [
        {
          "introduced": "3.1.0"
        },
        {
          "fixed": "7.0.0"
        }
      ],
      "type": "ECOSYSTEM"
    }
  ],
  "versions": [
    "3.1.0",
    "3.1.1",
    "3.1.2",
    "3.1.3",
    "3.1.4",
    "3.1.5",
    "3.1.6",
    "3.2.0",
    "3.2.0-rc.1",
    "3.2.0-rc.2",
    "3.2.1",
    "3.2.2",
    "3.2.3",
    "4.0.0",
    "4.0.1",
    "4.0.2",
    "4.1.0",
    "4.1.1",
    "4.1.2",
    "4.1.3",
    "4.2.0",
    "5.0.0",
    "5.0.1",
    "5.0.2",
    "5.1.0",
    "6.0.0",
    "6.0.1"
  ]
}

References