GHSA-xr53-m937-jr9c Cross-Site Scripting in ngx-md

Not scored Published

An attacker can inject malicious JavaScript via markdown links, leading to arbitrary code execution in the context of the user's browser.

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

What is GHSA-xr53-m937-jr9c?

GHSA-xr53-m937-jr9c is a cross-site scripting vulnerability in ngx-md, published on 3 Sep 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Versions of ngx-md prior to 6.0.3 are vulnerable to Cross-Site Scripting. Links are not properly restricted to http/https and can contain JavaScript which may lead to arbitrary code execution. Markdown input such as [Click Me](javascript:alert('Injected!'%29) is rendered as a Click Me link that executes JavaScript.

Recommendation

Upgrade to version 6.0.3 or later.

Which versions are affected by GHSA-xr53-m937-jr9c?

2 open source packages ship an affected version, including ngx-md.

PackageAffectedFixed in
ngx-md npmAll versions6.0.3
ngx-md npmAll versions6.0.3

How do I fix GHSA-xr53-m937-jr9c?

Upgrade ngx-md to 6.0.3 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 GHSA-xr53-m937-jr9c being exploited?

There is no known exploitation of GHSA-xr53-m937-jr9c in the wild and no public exploit code.

Sources

Is GHSA-xr53-m937-jr9c in your software?

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

Check your SBOMs for free