SiYuan: Authorization Bypass Allows Arbitrary SQL Execution via Search API
SiYuan is a personal knowledge management system. Versions 3.6.0 and below contain an authorization bypass vulnerability in the /api/search/fullTextSearchBlock endpoint. When the method parameter is set to 2, the endpoint passes user-supplied input directly as a raw SQL statement to the underlying SQLite database without any authorization or read-only checks. This allows any authenticated user — including those with the Reader role — to execute arbitrary SQL statements (SELECT, DELETE, UPDATE, DROP TABLE, etc.) against the application's database. This is inconsistent with the application's own security model: the dedicated SQL endpoint (/api/query/sql) correctly requires both CheckAdminRole and CheckReadonly middleware, but the search endpoint bypasses these controls entirely. This issue has been fixed in version 3.6.1.
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for the hundreds of thousands of vulnerabilities in the database; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for help- Published
- Mar 19, 2026
- Updated
- Jun 17, 2026
- EPSS
- 0.7% · 51th percentile
- CWE
- CWE-89
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
39
Monitor
Low priority for now.
- CVSS
- 39 / 40 · 9.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.7%
CISA SSVC decision
- Exploitation
- proof of concept
- Automatable
- yes
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- —
- CNA · GitHub_M
- 9.8
- NVD has not scored this yet; the score shown is the CNA’s.
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Affected systems
| Vendor | Product | CPE |
|---|---|---|
| b3log | siyuan | cpe:2.3:a:b3log:siyuan |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- b3log siyuanbefore 3.6.1
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
siyuan-note siyuan
- < 3.6.1affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Go | github.com/siyuan-note/siyuan/kernel | up to and including 0.0.0-20260313024916-fd6526133bb3 | — |
| Go | github.com/siyuan-note/siyuan/kernel | all versions | — |
Same product
b3log: all recordsOther highest-scoring records for the same primary product.
- CVE-2026-30869SiYuan has a Path Traversal in /export Endpoint Allows Arbitrary File Read and Secret Leakage39Monitor
- CVE-2024-53507A SQL injection vulnerability was discovered in Siyuan 3.1.11 in /getHistoryItems.39Monitor
- CVE-2024-53506A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the ids array parameter in /batchGetBlockAttrs.39Monitor
- CVE-2024-53505A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the id parameter at /getAssetContent.39Monitor
- CVE-2024-53504A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the notebook parameter in /searchHistory.39Monitor
- CVE-2026-34449SiYuan: Cross-Origin RCE via Permissive CORS Policy and JavaScript Snippet Injection38Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| siyuan-note siyuan | 3.6.1 · description | Vendor (CNA) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
- CVE-2024-53504475 days apartA SQL injection vulnerability has been identified in Siyuan 3.1.11 via the notebook parameter in /searchHistory.39Monitor
- CVE-2024-53505475 days apartA SQL injection vulnerability has been identified in Siyuan 3.1.11 via the id parameter at /getAssetContent.39Monitor
- CVE-2024-53506475 days apartA SQL injection vulnerability has been identified in Siyuan 3.1.11 via the ids array parameter in /batchGetBlockAttrs.39Monitor
- CVE-2024-53507475 days apartA SQL injection vulnerability was discovered in Siyuan 3.1.11 in /getHistoryItems.39Monitor
- CVE-2026-2907313 days apartSiYuan: Direct SQL Query API accessible to Reader-level users enables unauthorized database access22Monitor
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-89 · Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvd-secondary
Root cause
The query text is built by concatenating user input. The database cannot tell where the data ends and the command begins.
The bug in code
The whole CWE-89 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
const owner = req.query.owner;const rows = await db.query( "SELECT * FROM files WHERE owner = '" + owner + "'");Fixed
const owner = req.query.owner;const rows = await db.query( "SELECT * FROM files WHERE owner = $1", [owner]);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Command Line Execution through SQL InjectionCAPEC-108likelihood: Low · Very High
- Object Relational Mapping InjectionCAPEC-109likelihood: Low · High
- SQL Injection through SOAP Parameter TamperingCAPEC-110likelihood: High · Very High
- Expanding Control over the Operating System from the DatabaseCAPEC-470Very High
- SQL InjectionCAPEC-66likelihood: High · High
- Blind SQL InjectionCAPEC-7likelihood: High · High
ATT&CK techniques
—
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- github.com/siyuan-note/siyuan/commit/d5e2d0bce0dffef5f61bd8066954bc2d41181fc5
- github.com/siyuan-note/siyuan/issues/17209
- github.com/siyuan-note/siyuan/releases/tag/v3.6.1
Vendor advisories and official records. Exploit/PoC links are deliberately left out.