Skip to main content

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

CVE-2026-44588

Severity High
Score 9.4/10

Summary

SiYuan is an open-source personal knowledge management system. Prior to version 3.7.0-dev1, the tooltip mouseover handler in 'app/src/block/popover.ts' reads aria-label via 'getAttribute' and passes it through 'decodeURIComponent' before assigning to 'messageElement.innerHTML' in 'app/src/dialog/tooltip.ts'. The encoder used at the producer side, 'escapeAriaLabel' in 'app/src/util/escape.ts', only handles HTML special characters (", ', <, literal &lt;) -- it leaves '%XX' URL-escapes untouched. So a doc title containing '%3Cimg src=x onerror=...%3E' round-trips through 'escapeAriaLabel' and the HTML attribute layer unmodified. Then 'decodeURIComponent' on the consumer side converts '%3C' to a literal '<' character (a real '<', NOT a character reference). When that string is assigned to 'innerHTML', the HTML5 tokenizer enters 'TagOpenState' on the literal '<', parses the '<img>' element, and the onerror handler fires. Because the renderer runs with 'nodeIntegration: true', 'contextIsolation: false', 'webSecurity: false' (app/electron/main.js), 'require('child_process')' is reachable from the injected handler, escalating to arbitrary code execution.

  • LOW
  • NETWORK
  • ACTIVE
  • 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.

References

Advisory Timeline

  • Published