CVE-2022-0341: vditor cross-site scripting vulnerability

CVE-2022-0341 · Severity: low · CVSS 3.1 · Published 2022-03-15

vditor is a popular open-source markdown editor library used in web applications to allow users to create and edit rich content. A cross-site scripting (XSS) vulnerability in vditor versions prior to 3.8.11 allows attackers with authenticated access to inject malicious scripts that could steal user data, hijack sessions, or perform unauthorized actions within the affected application.

Technologies: vditor (npm). Vendors: npm.

Quick answers

Is CVE-2022-0341 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2022-0341 being exploited in the wild.
How severe is CVE-2022-0341?
Low severity, with a CVSS score of 3.1, published 15 March 2022.
Which products and versions are affected?
vditor (npm) SEMVER:introduced=0,fixed=3.8.11.
Is there a fix for CVE-2022-0341?
Yes. vditor (npm): upgrade to 3.8.11 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2022-0341 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2022-0341?
Check whether you run vditor (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • vditor (npm): upgrade to 3.8.11 or later
    npm install vditor@3.8.11

Technical details

The vulnerability is a stored/reflected cross-site scripting (CWE-79) flaw in vditor prior to version 3.8.11. The root cause involves improper sanitization of user-supplied input when processing certain HTML strings (particularly table elements like `<Table></Table>`) in the WYSIWYG editor mode via the `insertValue()` method. The attack requires user interaction and authenticated access (as indicated by the CVSS vector PR:L). An attacker can inject malicious JavaScript code that executes in the context of the vulnerable web application. The vulnerability was fixed in version 3.8.11, available via the npm package repository.

Affected products

  • vditor vditor prior to 3.8.11

Identifiers

  • CVE-2022-0341
  • GHSA-pq37-4c4g-v38c

Timeline

  • 2022-03-15: disclosed: CVE-2022-0341 published
  • 2022-03-15: patched: Version 3.8.11 released with fix

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.