VYPR
Moderate severityOSV Advisory· Published Dec 30, 2018· Updated Sep 16, 2024

CVE-2018-20583

CVE-2018-20583

Description

Cross-site scripting in PHP League CommonMark library versions before 0.18.1 allows injection of unsafe URLs via a newline character.

AI Insight

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

Cross-site scripting in PHP League CommonMark library versions before 0.18.1 allows injection of unsafe URLs via a newline character.

Vulnerability

The PHP League CommonMark library versions 0.15.6 through 0.18.0 (before 0.18.1) contain a cross-site scripting (XSS) vulnerability in the URL handling mechanism. Even when the allow_unsafe_links option is set to false, an attacker can bypass the filter by including a newline character in the URL (e.g., writing javascript as javascri%0apt). This allows unsafe URLs to be rendered in HTML output. [1][3]

Exploitation

An attacker with the ability to supply Markdown input to an application using the vulnerable library can craft a malicious link that contains a newline-encoded string. The attack does not require authentication or special privileges; it only requires the ability to submit content that will be rendered by the library. [1][2]

Impact

Successful exploitation leads to reflected or stored XSS, depending on how the rendered HTML is used. The attacker can execute arbitrary JavaScript in the context of the victim's browser, potentially leading to session hijacking, credential theft, or other malicious actions. [1][3]

Mitigation

The vulnerability is fixed in version 0.18.1 [4]. Users should upgrade to this version or later. If upgrading is not immediately possible, additional input sanitization and output encoding can be applied as a workaround. [1][3]

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

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
league/commonmarkPackagist
>= 0.15.6, < 0.18.10.18.1

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

7

News mentions

0

No linked articles in our index yet.