CVE-2021-39199CWE-79

Cross site scripting via unsafe defaults in remark-html

Critical · published September 7, 2021

CVSS v3.1
10.0
EPSS
1%
Percentile
64.7
In the wild
Unconfirmed
What it is

🔥 A sneaky oversight in remark-html means your Markdown could serve up a buffet of arbitrary HTML — and let the bad guys in! Think of it as a restaurant where the chef doesn’t check the ingredients before cooking — anyone can slip in anything without a second glance. This oversight could turn your trusted Markdown into a delivery mechanism for malicious code! An attacker could leverage this vulnerability to execute malicious scripts in the context of a user’s browser, leading to devastating XSS attacks. This could compromise user data, hijack sessions, and wreak havoc on the trustworthiness of your site!

Put simply

Think of it as a restaurant where the chef doesn’t check the ingredients before cooking — anyone can slip in anything without a second glance. This oversight could turn your trusted Markdown into a delivery mechanism for malicious code! This vulnerability arises from the fact that, despite documentation claiming safety, remark-html does not sanitize user input by default, allowing arbitrary HTML to be inserted unchecked. This can lead to XSS attacks if the library is used in applications without proper sanitation configuration.

What to do

An attacker could leverage this vulnerability to execute malicious scripts in the context of a user’s browser, leading to devastating XSS attacks. This could compromise user data, hijack sessions, and wreak havoc on the trustworthiness of your site! Update remark-html to version 13.0.2 or 14.0.1 to ensure safety by default. If an immediate upgrade isn’t possible, make sure to pass `sanitize: true` in your configuration to protect against potential exploits. Don’t let your guard down! You've got this! Following these steps will secure your application, making you a security hero! 🛡️

The record
Technical detail
CVSS v3.1
10.0 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.01075 · 64.7th percentile
Weakness
CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Published
2021-09-07T18:50Z
EPSS history
Timeline
  • 07 SEP 18:50Z
    Cross site scripting via unsafe defaults in remark-html
    cvelistv5