CVE-2021-47842CWE-79

StudyMD 0.3.2 - Persistent Cross-Site Scripting

Medium · published January 16, 2026

CVSS v4.0
5.1
EPSS
0%
Percentile
37.7
In the wild
Unconfirmed
What it is

⚠️ A crafty markdown file is all it takes to exploit this persistent cross-site scripting vulnerability! 🚀 Attackers can inject malicious scripts into your StudyMD platform with ease. Think of it like a sneaky chef slipping a secret ingredient into a recipe book — when someone opens that book, they get a surprise they definitely didn’t ask for. In this case, the ingredient is malicious code that runs when the markdown file is viewed. If an attacker successfully uploads a crafted markdown file, they could execute JavaScript in the context of your users, potentially leading to remote code execution. This could grant them access to sensitive data or even control over your system, which is absolutely devastating!

Put simply

Think of it like a sneaky chef slipping a secret ingredient into a recipe book — when someone opens that book, they get a surprise they definitely didn’t ask for. In this case, the ingredient is malicious code that runs when the markdown file is viewed. This vulnerability allows for persistent cross-site scripting (XSS) by enabling attackers to embed JavaScript payloads in markdown files, which execute upon viewing the file. Such exploitation can lead to significant security breaches.

What to do

If an attacker successfully uploads a crafted markdown file, they could execute JavaScript in the context of your users, potentially leading to remote code execution. This could grant them access to sensitive data or even control over your system, which is absolutely devastating! To mitigate this risk, update your StudyMD to version 0.3.3 or later to patch the vulnerability. Additionally, consider implementing input validation to sanitize uploaded content, ensuring that only safe markdown is processed. You've got this! Follow these steps to keep your StudyMD environment secure and your users safe! 🛡️

The record
Technical detail
CVSS v4.0
5.1 · MEDIUM
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
EPSS
0.00444 · 37.7th percentile
Weakness
CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Published
2026-01-16T19:09Z
EPSS history
Timeline
  • 16 JAN 19:09Z
    StudyMD 0.3.2 - Persistent Cross-Site Scripting
    cvelistv5