CVE-2021-33295: Joplin Desktop cross-site scripting via NOSCRIPT tags

CVE-2021-33295 · Severity: low · CVSS 3.1 · Published 2022-06-17

Joplin is a note-taking and document management application. A cross-site scripting vulnerability in Joplin Desktop allows attackers to execute arbitrary code by embedding malicious NOSCRIPT tags in notes, due to insufficient HTML sanitization. An attacker could use this to steal user data, compromise the user's system, or perform actions on behalf of the user.

Technologies: joplin (npm). Vendors: npm.

Quick answers

Is CVE-2021-33295 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2021-33295 being exploited in the wild.
How severe is CVE-2021-33295?
Low severity, with a CVSS score of 3.1, published 17 June 2022.
Which products and versions are affected?
joplin (npm) SEMVER:introduced=0,fixed=1.8.5.
Is there a fix for CVE-2021-33295?
Yes. joplin (npm): upgrade to 1.8.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2021-33295 attacked?
It is attacked over the network.
Am I affected by CVE-2021-33295?
Check whether you run joplin (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

  • joplin (npm): upgrade to 1.8.5 or later
    npm install joplin@1.8.5

Technical details

This is a cross-site scripting (XSS) vulnerability (CWE-79) in Joplin Desktop before version 1.8.5, caused by improper sanitization of HTML content. The vulnerable component is the HTML rendering and sanitization logic in the renderer package (htmlUtils.ts). The attack vector requires user interaction—an attacker must craft a malicious note containing specially-formed NOSCRIPT tags that bypass the HTML sanitizer, which is then opened or displayed by a user. When rendered, the malicious script executes in the context of the application, allowing arbitrary code execution. The vulnerability was patched in version 1.8.5 by filtering out NOSCRIPT tags during HTML sanitization.

Affected products

  • Joplin Joplin Desktop before 1.8.5

Identifiers

  • CVE-2021-33295
  • GHSA-phj8-2p6x-hq5r

Timeline

  • 2022-06-17: disclosed: Advisory published
  • 1.8.5: patched: Vulnerability fixed in Joplin Desktop 1.8.5

References

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