CVE-2026-40318 SiYuan: Publish Reader Path Traversal Delete via `removeUnusedAttributeView`

High 8.5 Published Updated

Attackers can delete arbitrary JSON files on the server via path traversal in the removeUnusedAttributeView API endpoint.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-40318?

CVE-2026-40318 is a high-severity path traversal vulnerability in B3log Siyuan, published on 16 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

SiYuan is an open-source personal knowledge management system. In versions 3.6.3 and prior, the /api/av/removeUnusedAttributeView endpoint constructs a filesystem path using the user-controlled id parameter without validation or path boundary enforcement. An attacker can inject path traversal sequences such as ../ into the id value to escape the intended directory and delete arbitrary .json files on the server, including global configuration files and workspace metadata. This issue has been fixed in version 3.6.4.

Weakness: CWE-24

Which versions are affected by CVE-2026-40318?

3 open source packages ship an affected version, including github.com/siyuan-note/siyuan/kernel. It affects 1 product.

PackageAffectedFixed in
github.com/siyuan-note/siyuan/kernel GoAll versionsNone
github.com/siyuan-note/siyuan/kernel GoAll versions3.6.40.0.0-20260407035653-2f416e5253f1
github.com/siyuan-note/siyuan/kernel GoAll versions3.6.40.0.0-20260407035653-2f416e5253f1

Products include B3log Siyuan.

How do I fix CVE-2026-40318?

Upgrade github.com/siyuan-note/siyuan/kernel to 3.6.40.0.0-20260407035653-2f416e5253f1 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-40318 being exploited?

There is no known exploitation of CVE-2026-40318 in the wild and no public exploit code.

All B3log Siyuan vulnerabilities

Sources

Also known as GHSA-vw86-c94w-v3x4, GO-2026-5679.

Is CVE-2026-40318 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free