Skip to content

Markdown XSS leads to RCE in VNote version <=3.18.1

Notifications You must be signed in to change notification settings

sh3bu/CVE-2024-41662

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

CVE-2024-41662

Markdown XSS leads to RCE in VNote version <=3.18.1

Severity : High (8.6)

CVSS score : CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Summary :

A Cross-Site Scripting (XSS) vulnerability was identified in the Markdown rendering functionality of the VNote note-taking application. This vulnerability allows the injection and execution of arbitrary JavaScript code, potentially leading to Remote Code Execution (RCE).

Steps to Reproduce :

  1. Create a note in Vnote.
  2. Enter the following JS payload in the app,
<img src="" onerror="alert('XSS') alt="alt text">
  1. Press CTRL+T to render the markdown content.
  2. Observe the JavaScript payload executing an alert popup.

image

There is no whitelisting or output encoding performed for the given payload, resulting in an XSS vulnerability.

NOTE: The application properly validates some JavaScript payloads by performing output encoding in the app. However, it fails to validate in certain cases.

image

image

  1. Further an attacker can achieve Remote Code execution using the following payload.
<iframe src="../../../../../../../../Windows/System32/cmd.exe"  />

image

Affected Version Details :

  • <=3.18.1

Impact :

This vulnerability can be exploited by an attacker to gain unauthorized access to the system, execute arbitrary commands, and potentially take control of the affected machine. This could lead to system compromise and other severe security incidents.

Mitigation :

  • Implement rigorous input sanitization for all Markdown content.
  • Utilize a secure Markdown parser that appropriately escapes or strips potentially dangerous content.

References :

About

Markdown XSS leads to RCE in VNote version <=3.18.1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published