CVE-2021-39199
JavaScript vulnerability analysis and mitigation

Overview

remark-html, an open source nodejs library which compiles Markdown to HTML, contained a critical security vulnerability in versions <13.0.2 and 14.0.0. While the documentation claimed the library was safe by default, in practice the default configuration was unsafe and required explicit opt-in for security features. This mismatch between documentation and implementation could lead to arbitrary HTML being passed through, potentially enabling XSS attacks (GitHub Advisory).

Technical details

The vulnerability stemmed from the library's default configuration not matching its documented security claims. By default, the sanitization feature was disabled, allowing arbitrary HTML to pass through without sanitization. This implementation flaw meant that users following the documentation's default usage pattern were unknowingly exposed to potential security risks. The issue was assigned CVE-2021-39199 and received a Critical severity rating (GitHub Advisory).

Impact

The vulnerability could allow attackers to perform cross-site scripting (XSS) attacks by passing arbitrary HTML through the library's processing pipeline. Since the library was commonly used to convert markdown to HTML in web applications, this could lead to client-side code execution in the context of the vulnerable application (GitHub Advisory).

Mitigation and workarounds

The issue was patched in versions 13.0.2 and 14.0.1, making the library safe by default and aligning the implementation with the documentation. For users unable to upgrade, a workaround was available by explicitly enabling sanitization with the configuration option {sanitize: true} (GitHub Advisory, GitHub Commit).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66456CRITICAL9.1
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-66457HIGH7.5
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-65849MEDIUM6.9
  • JavaScriptJavaScript
  • altcha
NoNoDec 08, 2025
CVE-2025-66202MEDIUM6.5
  • JavaScriptJavaScript
  • astro
NoYesDec 09, 2025
CVE-2025-14284MEDIUM5.1
  • JavaScriptJavaScript
  • @tiptap/extension-link
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management