VYPR
Medium severity6.1NVD Advisory· Published Apr 12, 2026· Updated Apr 17, 2026

CVE-2017-20239

CVE-2017-20239

Description

MDwiki contains a cross-site scripting vulnerability that allows remote attackers to execute arbitrary JavaScript by injecting malicious code through the location hash parameter. Attackers can craft URLs with JavaScript payloads in the hash fragment that are parsed and rendered without sanitization, causing the injected scripts to execute in the victim's browser context.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

MDwiki's client-side wiki engine has a cross-site scripting vulnerability where unsanitized location hash input allows arbitrary JavaScript execution.

Vulnerability

Description

MDwiki, a client-side wiki system built entirely on HTML5 and JavaScript, suffers from a cross-site scripting (XSS) vulnerability due to improper sanitization of the location hash parameter. The application reads the hash fragment from the URL (e.g., #!) and directly assigns it to a.md.mainHref after URL decoding, without any validation or escaping [1][2]. This raw input is subsequently used to fetch content via an AJAX request and is later rendered through the marked library, which interprets the payload as Markdown and raw HTML, leading to execution of injected scripts [1].

Exploitation

An attacker can exploit this vulnerability by crafting a malicious URL containing a JavaScript payload in the hash fragment, such as #!. The victim must click on the crafted link, which triggers the vulnerable code path. The payload is parsed, fetched, and rendered in the context of the MDwiki page, executing the attacker's script in the victim's browser [1]. No authentication is required beyond the victim visiting the link, and the attack can be performed remotely over the network [2].

Impact

Successful exploitation allows the attacker to execute arbitrary JavaScript in the context of the victim's session against the MDwiki origin. This can lead to session hijacking, data theft, defacement, or further attacks against the user's browser [2]. The CVSS v3.1 score is 6.1 (Medium), reflecting the need for user interaction and low impact to confidentiality and integrity [2].

Mitigation

As of the disclosure date, no official patch has been released for MDwiki. The project may be unmaintained. Administrators should consider implementing input sanitization for the hash parameter or upgrading to an alternative wiki solution. The vulnerability has been publicly documented in exploit databases and advisory platforms [1][2].

AI Insight generated on May 18, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

1

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

2

News mentions

0

No linked articles in our index yet.