Cross-Site Scripting Vulnerability in ngx-md

ngx-md Updated 02 Oct 2025

Summary

03/09/2020
HIGH
Yes i
High
Not published

GHSA-xr53-m937-jr9c: Cross-Site Scripting in ngx-md. Affects ngx-md versions < 6.0.3. Fixed in 6.0.3. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

ngx-md is an npm package that provides a Markdown parser and renderer for Angular applications. It allows users to render Markdown content as HTML, providing a convenient way to display formatted text. However, versions prior to 6.0.3 are vulnerable to a Cross-Site Scripting (XSS) attack.

Vulnerability Detail

The vulnerability in ngx-md arises from improper restriction of links to http/https. This allows the inclusion of JavaScript code within links, which can lead to arbitrary code execution. An attacker can craft a malicious Markdown input that includes JavaScript code, such as [Click Me](javascript:alert('Injected!')), which will be rendered as a clickable link. When clicked, the JavaScript code will execute, potentially leading to unauthorized actions or data theft.

How To Fix

Minimum fixed version

6.0.3

This is the first release that contains the fix.

npm install ngx-md@6.0.3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to upgrade to the fixed version to address the issue.

Conclusion

The Cross-Site Scripting vulnerability in ngx-md can lead to arbitrary code execution and potential security breaches in applications using vulnerable versions. It is crucial to upgrade to version 6.0.3 or later to mitigate this vulnerability. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for ngx-md →

Share this vulnerability

FAQ

ngx-md is an npm package that provides a Markdown parser and renderer for Angular applications. It allows developers to easily render Markdown content as HTML.

Cross-Site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. This can lead to unauthorized actions or data theft.

If your application uses ngx-md and is using a version prior to 6.0.3, it is vulnerable to Cross-Site Scripting (XSS) attacks. An attacker can craft malicious Markdown input that includes JavaScript code, which can be executed when users interact with the rendered content.

No, there is no known workaround for this vulnerability. It is crucial to upgrade to version 6.0.3 or later of ngx-md to address the issue.

To upgrade ngx-md to the fixed version (6.0.3 or later), you can update the package in your project's package.json file and run the package manager's update command. For example, if you are using npm, you can run npm install ngx-md@6.0.3 to install the fixed version.

How To Fix

Minimum fixed version

6.0.3

This is the first release that contains the fix.

npm install ngx-md@6.0.3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback