Skip to main content

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

CVE-2023-39517

Severity Medium
Score 5.4/10

Summary

Joplin is a free, open-source note-taking and to-do application. A Cross-site Scripting (XSS) vulnerability in affected versions allows clicking on an untrusted image link to execute arbitrary shell commands. The HTML sanitizer (`packages/renderer/htmlUtils.ts::sanitizeHtml`) preserves '<map>' '<area>' links. However, unlike '<a>' links, the 'target' and 'href' attributes are not removed. Additionally, because the note preview pane isn't sandboxed to prevent top navigation, links with 'target' set to '_top' can replace the top-level electron page. Because any top-level electron page with Joplin's setup has access to 'require' and can require node libraries, a malicious replacement top-level page can import 'child_process' and execute arbitrary shell commands. Users are advised to upgrade. There are no known workarounds for this vulnerability. This issue affects @joplin/renderer versions prior to 2.12.1.

  • LOW
  • NETWORK
  • LOW
  • CHANGED
  • REQUIRED
  • LOW
  • LOW
  • NONE

CWE-79 - Cross Site Scripting

Cross-Site Scripting, commonly referred to as XSS, is the most dominant class of vulnerabilities. It allows an attacker to inject malicious code into a pregnable web application and victimize its users. The exploitation of such a weakness can cause severe issues such as account takeover, and sensitive data exfiltration. Because of the prevalence of XSS vulnerabilities and their high rate of exploitation, it has remained in the OWASP top 10 vulnerabilities for years.

Advisory Timeline

  • Published