# SiYuan: Missing publish-access filter on getFileAnnotation…

🐹

🐹 Go

Not in CISA KEV

MEDIUM severity

# SiYuan: Missing publish-access filter on getFileAnnotation discloses private PDF annotations of forbidden/protected documents (publish mode)GHSA-v7ph-r5r6-4jcj

MEDIUM [Fix: siyuan-note/siyuan@509b350](https://github.com/siyuan-note/siyuan/commit/509b35055940856ec1c89cb4888723c4660b776a)

GHSA-v7ph-r5r6-4jcj is a medium-severity (CVSS 5.8) CWE-862 vulnerability in github.com/siyuan-note/siyuan/kernel. A fix is available for github.com/siyuan-note/siyuan/kernel — see the affected versions and patch details below.

Also known as[CVE-2026-72808](/vulnerability/CVE-2026-72808)GO-2026-6406

Published

Sep 3, 2026

Updated

Sep 10, 2026

Affected

1 pkg

Patched

1 / 1

Exploits

None indexed

Exploitation data as of Nov 3, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

## Exploitation Status

### Proof-of-concept exploit code exists

-   CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
-   CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.

Exploitation and automatability from CISA’s SSVC triage for GHSA-v7ph-r5r6-4jcj.

## EPSS Exploitation Probability

[via FIRST.org ↗](https://www.first.org/epss/)

0.4%probability of exploitation in next 30 days

Lower Risk+0.07%

Lower risk than most CVEs29th percentile — riskier than 29% of all scored CVEsHighest risk

0.00%0.28%0.57%0.85%0.3%0.4%Sep 26Nov 26

Probability of exploitation in the next 30 days, from [FIRST.org EPSS](https://www.first.org/epss/).

## How urgent is this, really

## Where this sits among everything scored

## Real-World Exposure

1 pkg affected

🐹`github.com/siyuan-note/siyuan/kernel`

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

## Description

**CVE:** This vulnerability corresponds to [CVE-2026-72808](https://nvd.nist.gov/vuln/detail/CVE-2026-72808).

#### Summary

The `/api/asset/getFileAnnotation` endpoint returns the content of `.sya` PDF-annotation files with no publish-access check. It is gated by `CheckAuth` only, so it is reachable by the publish `RoleReader` token and by the anonymous account when `Publish.Auth.Enable` is `false`. Its sibling, the `/assets/*` asset route does enforce publish access, including the publish password. An anonymous reader who knows an asset path can therefore read the private PDF annotations (highlights, notes) attached to assets in publish-forbidden, password-protected, or unpublished documents.

#### Details

`getFileAnnotation` resolves the annotation file via `GetAssetAbsPathInBox` (no path traversal) and returns the `.sya` content. Unlike the `/assets/*` route, which applies the publish-access filter including password enforcement before serving asset bytes, `getFileAnnotation` applies no publish-access, publish-ignore, or password check. The guarded-sibling asymmetry indicates the boundary is meant to apply to this data and was omitted here.

`.sya` files for encrypted-box assets are fail-closed and not exposed. The gap is limited to non-encrypted assets.

**Route / auth tier.** `getFileAnnotation` is registered `CheckAuth`\-only. `CheckAuth` admits `RoleReader`; the publish proxy forwards port-6808 traffic with a Reader JWT (anonymous when publish auth is disabled).

#### Proof of Concept

Reproduced on a local instance (publish mode on 6808, Basic Auth off).

**Setup (admin, 6806):**

1.  `createNotebook{name:"AnnotPoc"}` → box
2.  `createDocWithMd{notebook, path:"/annot-victim", markdown:"doc with a pdf"}` → doc
3.  `POST /api/asset/upload` (multipart `id=<doc>`, `file[]=@secret.pdf`) → `assets/secret-...pdf`
4.  `setFileAnnotation{path:"<asset>.sya", data:"{annotSecret:ANNOT_SECRET_4471,note:private highlight}"}`
5.  `setPublishAccess{id:<doc>, visible:false, password:"", disable:true}` → doc forbidden

**Exploit (anonymous reader, 6808, no token):**

```
POST http://127.0.0.1:6808/api/asset/getFileAnnotation
{"path":"assets/secret-...pdf.sya"}
```

Returns:

```
{"code":0,"data":{"data":"{\"annotSecret\":\"ANNOT_SECRET_4471\",\"note\":\"private highlight\"}"}}
```

The annotation content of a publish-forbidden document is returned to an anonymous reader with no publish-access check, while the `/assets/*` route serving the same asset class enforces publish access and password.

#### Impact

An anonymous reader (publish mode with auth disabled) or any publish `RoleReader` can read the private PDF annotations (highlights and notes) of assets belonging to publish-forbidden, password-protected, or unpublished documents, given the asset path. This defeats the publish-access/password boundary for annotation data. Scope is limited to annotated PDFs in non-encrypted notebooks; encrypted-box annotations are not exposed. Confidentiality-only.

#### Suggested fix

Apply the same publish-access check the `/assets/*` route uses to `getFileAnnotation` resolve the asset's owning document and enforce the publish-access/publish-ignore / password check before returning `.sya` content.

## Affected Packages

1 total 1 fixed

Ecosystem

Package

Vulnerable range

Fix

🐹Go

`github.com/siyuan-note/siyuan/kernel` 

all versions

0.0.0-20260723031702-509b35055940`go get github.com/siyuan-note/siyuan/kernel@v0.0.0-20260723031702-509b35055940`

## Detection & mitigation playbook

Open-source dependency

1.  ### Detect
    
    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/siyuan-note/siyuan/kernel, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
    
2.  ### Fix
    
    Update github.com/siyuan-note/siyuan/kernel to 0.0.0-20260723031702-509b35055940 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-v7ph-r5r6-4jcj is resolved across your whole dependency graph.
    
3.  ### Workarounds
    
    Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
    

## Frequently Asked Questions

\*\*CVE:\*\* This vulnerability corresponds to \[CVE-2026-72808\](https://nvd.nist.gov/vuln/detail/CVE-2026-72808). ### Summary The \`/api/asset/getFileAnnotation\` endpoint returns the content of \`.sya\` PDF-annotation files with no publish-access check. It is gated by \`CheckAuth\` only, so it is reachable by the publish \`RoleReader\` token and by the anonymous account when \`Publish.Auth.Enable\` is \`false\`. Its sibling, the \`/assets/\*\` asset route does enforce publish access, including the publish password. An anonymous reader who knows an asset path can therefore read the private PDF annotations (hig

O3 Security · Impact-Aware SCA

### Is GHSA-v7ph-r5r6-4jcj in your dependencies?

Find it across Go, including transitive dependencies.

[Scan my dependencies](/book-demo) [How O3 SCA works](/impact-aware-sca)