You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remote Code Execution in Logseq Desktop <= 0.10.13
Critical
tiensonqin
published
GHSA-92h5-2358-7xjvAug 18, 2025
Package
logseq
(logseq)
Affected versions
<= 0.10.13
Patched versions
None
Description
Summary
A critical vulnerability chain in Logseq Desktop allows remote code execution (RCE) via a malicious PDF. An outdated version of pdfjs-dist, vulnerable to XSS (CVE-2024-4367), allows arbitrary JavaScript execution, which can be used to trigger a command injection via Git (api.cljs or git.cljs). User action required (e.g. open a malicious PDF in Logseq).
Details
Logseq Desktop bundles an outdated version of pdfjs-dist that is vulnerable to cross-site scripting (CVE-2024-4367). When a malicious PDF is opened, the embedded JavaScript is executed during PDF rendering. This JavaScript can call exposed Logseq internal APIs such as logseq.sdk.git.exec_command or logseq.api.exec_git_command, allowing an attacker to execute arbitrary shell commands. This leads to a full Remote Command Execution (RCE), combining XSS vulnerability and command injection via Git integration.
PoC
Download PoC-logseq-CVE-2024-4367.pdf and upload it as asset (or host it on a web server if preferred and link it in a Logseq page).
Open the file using Logseq Desktop on macOS.
When the PDF is rendered, the embedded JavaScript is executed, launching the Calculator app in macOS.
Payload embedded in the PDF file
logseq.sdk.git.exec_command(['config','--global','alias.calc','!open -a Calculator']);logseq.sdk.git.exec_command(['calc']);
PoC Video
RCE-Logseq-0-10-11.mp4
Impact
Successful exploitation allows an attacker to execute arbitrary commands on the victim’s machine, leading to full remote code execution (RCE).
Summary
A critical vulnerability chain in Logseq Desktop allows remote code execution (RCE) via a malicious PDF. An outdated version of
pdfjs-dist
, vulnerable to XSS (CVE-2024-4367), allows arbitrary JavaScript execution, which can be used to trigger a command injection via Git (api.cljs
orgit.cljs
). User action required (e.g. open a malicious PDF in Logseq).Details
Logseq Desktop bundles an outdated version of pdfjs-dist that is vulnerable to cross-site scripting (CVE-2024-4367). When a malicious PDF is opened, the embedded JavaScript is executed during PDF rendering. This JavaScript can call exposed Logseq internal APIs such as
logseq.sdk.git.exec_command
orlogseq.api.exec_git_command
, allowing an attacker to execute arbitrary shell commands. This leads to a full Remote Command Execution (RCE), combining XSS vulnerability and command injection via Git integration.PoC
Payload embedded in the PDF file
PoC Video
RCE-Logseq-0-10-11.mp4
Impact
Successful exploitation allows an attacker to execute arbitrary commands on the victim’s machine, leading to full remote code execution (RCE).