Cyber Resilience

CVE-2025-21609

B3Log Siyuan 3.1.18

Public PoC
Published
03 January 2025
Modified
14 May 2025
Patch / advisory
CVSS Score v4 8.7
Click a component to see what it means
Raw vectorCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/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
EPSS Score 0.0060 46th percentile
Risk Priority 45 floored blend · peak EPSS

Summary

CVE-2025-21609 is a high-severity Incomplete Cleanup (CWE-459) vulnerability in B3Log Siyuan. Its CVSS base score is 8.7 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Data from Local System (T1005); ranked at the 46th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

The strongest mitigations our analysis identified map to AC-3 (Access Enforcement) and AC-6 (Least Privilege) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

SiYuan Note version 3.1.18, a self-hosted open source personal knowledge management software, contains an arbitrary file deletion vulnerability identified as CVE-2025-21609. The issue resides in the POST /api/history/getDocHistoryContent endpoint, where an attacker can craft a malicious payload to delete arbitrary files on the affected server. This flaw is rated with a CVSS v3.1 base score of 9.1 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H) and is associated with CWE-459 (Incomplete Cleanup) and CWE-552 (Files or Directories Accessible to External Parties).

The vulnerability enables exploitation by unauthenticated remote attackers over the network with low complexity and no user interaction required. Successful exploitation allows the attacker to delete any file on the server, potentially disrupting service availability and compromising data integrity without affecting confidentiality.

Mitigation is addressed in commit d9887aeec1b27073bec66299a9a4181dc42969f3 from the SiYuan GitHub repository, which resolves the issue and is expected to appear in version 3.1.19. Additional details are available in the GitHub Security Advisory at GHSA-8fx8-pffw-w498. Security practitioners should update to the patched version and review access to the affected endpoint.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

SiYuan is self-hosted, open source personal knowledge management software. SiYuan Note version 3.1.18 has an arbitrary file deletion vulnerability. The vulnerability exists in the `POST /api/history/getDocHistoryContent` endpoint. An attacker can craft a payload to exploit this vulnerability, resulting in the…

more

deletion of arbitrary files on the server. Commit d9887aeec1b27073bec66299a9a4181dc42969f3 fixes this vulnerability and is expected to be available in version 3.1.19.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1005 Data from Local System Collection
Adversaries may search local system sources, such as file systems, configuration files, local databases, virtual machine files, or process memory, to find files of interest and sensitive data prior to Exfiltration.
T1039 Data from Network Shared Drive Collection
Adversaries may search network shares on computers they have compromised to find files of interest.
T1119 Automated Collection Collection
Once established within a system or network, an adversary may use automated techniques for collecting internal data.
T1530 Data from Cloud Storage Collection
Adversaries may access data from cloud storage.
T1552.001 Credentials In Files Credential Access
Adversaries may search local file systems and remote file shares for files containing insecurely stored credentials.
T1552.004 Private Keys Credential Access
Adversaries may search for private key certificate files on compromised systems for insecurely stored credentials.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-32750Same product: B3Log Siyuan
CVE-2026-32704Same product: B3Log Siyuan
CVE-2025-68948Same product: B3Log Siyuan
CVE-2026-40318Same product: B3Log Siyuan
CVE-2026-32938Same product: B3Log Siyuan
CVE-2026-32749Same product: B3Log Siyuan
CVE-2026-33476Same product: B3Log Siyuan
CVE-2026-40259Same product: B3Log Siyuan
CVE-2024-6938Same product: B3Log Siyuan
CVE-2026-32940Same product: B3Log Siyuan

Affected Assets

b3log
siyuan
3.1.18

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)
  • 5 hardening rules · 2 OS baselines
Validate
Prove the fix (OWASP ASVS)
  • V6.4.1
  • V8.4.2

Mitigating Controls (NIST 800-53 r5) AI

AC-3 directly enforces authorization checks on access to files and directories, stopping unauthorized external exposure.

AC-6 limits granted privileges, reducing the chance that files or directories become reachable by external parties.

Developer testing and evaluation can discover incomplete cleanup through dynamic analysis or resource-leak testing.

Non-persistence mechanisms explicitly initiate resources in a known state and terminate them, directly enforcing cleanup.

Session termination forces explicit release of session-related temporary resources.

AC-4 enforces information flow rules that can block unauthorized external access to files or directories.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.AA-05 mostly match
prevents

Enforcing least-privilege permissions and authorization policies directly prevents unauthorized file/directory exposure.

PR.IR-01 mostly match
prevents

Logical segmentation and access protections stop external parties from reaching files that should remain internal.

PR.PS-06 mostly match
prevents

Secure-development practices and coding standards normally require proper resource release and cleanup.

ID.AM-08 partial match
prevents

Life-cycle management encompasses disposal of temporary resources but does not specifically target runtime cleanup bugs.

PR.DS-01 partial match
prevents

Data-at-rest protections such as encryption or ACLs reduce the impact of unintended file exposure.

PR.DS-10 partial match
prevents

Explicitly calls for removing sensitive data after use, directly addressing one class of incomplete cleanup.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

degrades

Explicitly requires secure deletion of temporary or residual data, directly addressing incomplete cleanup.

mitigates

By tracing and retrieving all copies of information stored on endpoint and portable devices, the control reduces the likelihood that files remain accessible outside the organization’s security perimeter.

mitigates

Labeling information according to its sensitivity and specifying corresponding protection measures makes it less probable that files or directories containing sensitive content will be left accessible to external parties.

mitigates

Including asset location and ownership in the inventory, combined with secure disposal procedures, decreases the chance that files or directories remain accessible to external parties after they should have been removed or restricted.

mitigates

Solid perimeters and locked external access points stop files, devices, or directories containing sensitive data from being reachable by external parties who could otherwise walk in or break in.

mitigates

Authorizing and logging the removal of storage media, disabling unused ports, and monitoring transfers limit the exposure of files or directories to external parties outside the organization’s controlled environment.

Hardening callouts derived

Configuration rules from DISA STIG baselines that bear on weaknesses of the type cited by this CVE. Each rule is shown with the relationship its mapping actually records, against the CWE it was authored against. Derived via CVE→CWE over `controls_xwalks` (authoritative rows only; rows rated `none` are excluded).

Oracle Linux 8 (2 rules)
  • V-248579 OL 8 must restrict access to the kernel message buffer. prevents CWE-552
  • V-248597 There must be no "shosts.equiv" files on the OL 8 operating system. prevents CWE-552

References