Cyber Resilience

CVE-2026-32767

SQLi in B3Log Siyuan ≤ 3.6.1

Published
20 March 2026
Modified
23 March 2026
Patch / advisory
CVSS Score v3.1 9.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0054 43th percentile
Risk Priority 72 floored blend · peak EPSS

Summary

CVE-2026-32767 is a critical-severity SQL Injection (CWE-89) vulnerability in B3Log Siyuan. Its CVSS base score is 9.8 (Critical).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked at the 43th 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-24 (Access Control Decisions) and AC-25 (Reference Monitor) — 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, a personal knowledge management system, contains an authorization bypass vulnerability (CVE-2026-32767) affecting versions 3.6.0 and below. The issue resides in the /api/search/fullTextSearchBlock endpoint, where setting the method parameter to 2 causes the endpoint to pass user-supplied input directly as a raw SQL statement to the underlying SQLite database. This occurs without any authorization or read-only checks, enabling SQL injection. The vulnerability stems from an inconsistency in the application's security model: while the dedicated /api/query/sql endpoint enforces CheckAdminRole and CheckReadonly middleware, the search endpoint bypasses these controls entirely. It is classified under CWE-89 (Improper Neutralization of Special Elements used in an SQL Command) and CWE-863 (Incorrect Authorization), with a CVSS v3.1 base score of 9.8 (Critical).

Any authenticated user, including those with the Reader role, can exploit this vulnerability over the network with low complexity and no user interaction. Attackers can execute arbitrary SQL statements such as SELECT, DELETE, UPDATE, and DROP TABLE against the application's database, potentially leading to complete data compromise, modification, or destruction depending on the database contents and user permissions.

The vulnerability has been fixed in SiYuan version 3.6.1, as detailed in the project's GitHub release notes, security advisory (GHSA-j7wh-x834-p3r7), associated issue tracker (#17209), and the fixing commit (d5e2d0bce0dffef5f61bd8066954bc2d41181fc5). Security practitioners should urge users to upgrade immediately and review access controls in similar endpoints.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1548 Abuse Elevation Control Mechanism Privilege Escalation
Adversaries may circumvent mechanisms designed to control privilege elevation to gain higher-level permissions.
T1548.002 Bypass User Account Control Privilege Escalation
Adversaries may bypass UAC mechanisms to elevate process privileges on system.
T1548.003 Sudo and Sudo Caching Privilege Escalation
Adversaries may perform sudo caching and/or use the sudoers file to elevate privileges.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1210 Exploitation of Remote Services Lateral Movement
Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2024-1982Shared CWE-89
CVE-2024-4351Shared CWE-89
CVE-2024-32655Shared CWE-89
CVE-2024-27304Shared CWE-89
CVE-2024-33872Shared CWE-89
CVE-2024-37858Shared CWE-89
CVE-2024-4609Shared CWE-89
CVE-2023-25651Shared CWE-89
CVE-2024-4547Shared CWE-89
CVE-2024-4548Shared CWE-89

Affected Assets

b3log
siyuan
≤ 3.6.1

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 · 3 OS baselines
Validate
Prove the fix (OWASP ASVS)
  • V6.2.5

Mitigating Controls (NIST 800-53 r5) AI

AC-3 directly requires correct enforcement of authorization decisions on every access request, structurally preventing incorrect checks.

AC-24 ensures access-control decisions are made and applied consistently, reducing the chance of an incorrect authorization result.

A reference monitor that is always invoked and tamper-proof forces every authorization decision through a verified, correct path.

Developer testing and evaluation can discover SQLi flaws before deployment but does not stop their introduction.

Input validation directly stops untrusted data from reaching SQL query construction without neutralization.

Least-privilege assignments shrink the set of authorizations that must be checked correctly, limiting exposure to flawed checks.

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

Defining, enforcing, and reviewing access authorizations and least privilege directly prevents incorrect authorization checks.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly target injection flaws during coding and review so largely prevent CWE-89 introduction, yet the single broad outcome leaves residual risk from incomplete neutralization techniques or missed edge cases.

PR.AT-02 partial match
prevents

Training raises developer awareness of SQLi risks and can reduce introduction likelihood (partial) but removes none of the actual coding flaw's risk by itself since technical neutralization is still required.

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.

finds

The same secure-coding and static-analysis activities surface missing neutralization of SQL metacharacters before the system is accepted.

prevents

Requiring consistency between access rights and classification plus formal approval steps ensures that the authorization logic correctly distinguishes between entities that should and should not be granted access.

prevents

Enforcing policy-driven approval and role-change reviews stops incorrect or stale authorization decisions from remaining in effect after job changes or terminations.

prevents

Early warnings and shared best-practice information help organizations apply the latest remediation techniques against SQL-injection vulnerabilities.

prevents

Threat-intelligence feeds that surface new SQL-injection campaigns enable rapid updates to query-construction defenses and detection signatures before exploitation occurs.

prevents

Secure-coding rules and security testing phases mandate the use of parameterized queries or equivalent escaping, preventing the construction of dynamic SQL statements from untrusted input.

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-248581 OL 8 must require users to provide a password for privilege escalation. prevents CWE-863
  • V-252656 The OL 8 operating system must not be configured to bypass password requirements for privilege escalation. prevents CWE-863
RHEL 7 (1 rule)
  • V-204430 The Red Hat Enterprise Linux operating system must be configured so that users must re-authenticate for privilege escalation. prevents CWE-863
RHEL 8 (1 rule)
  • V-251712 The RHEL 8 operating system must not be configured to bypass password requirements for privilege escalation. prevents CWE-863

References