/

CVE-2026-73046

Severity:

CRITICAL RISK

(9.8)

Authentication Brute-Force (CWE-307) in SiYuan Kernel

CVE-2026-73046

Deferred

Vulnerability type

Category:

Authentication Rate-Limit Bypass

CWE:

CWE-307

Impact:

Unauthorized Administrator Access

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

SiYuan contains an authentication rate-limiting weakness in the CheckAuth() middleware, allowing unlimited automated attempts against the workspace access code through HTTP Basic Authentication. A remote unauthenticated attacker who successfully guesses the code may obtain administrator-level access to the kernel and its protected API surface.

Affected context

The weakness occurs in SiYuan deployments that protect the /api/* interface with HTTP Basic Authentication using the workspace access code. The Basic Authentication path does not share the CAPTCHA, lockout, or failure-counter controls used by the cookie/session login flow, and the credential comparison also does not provide constant-time behavior.

Exploit preconditions

  • Attack surface: Network-accessible SiYuan HTTP API endpoints
  • Required access: No prior authentication is required
  • Trigger point: Repeated HTTP Basic Authentication requests handled by CheckAuth()
  • Required condition: The protected interface must be reachable and use the workspace access code for Basic Authentication
  • Why exploitation is possible: The Basic Authentication branch neither enforces the existing lockout gate nor increments the failure counter, permitting unlimited automated guesses

Why this happens

The vulnerability results from inconsistent enforcement of authentication controls across login mechanisms. The HTTP Basic Authentication branch accepts the workspace access code but bypasses the CAPTCHA and failure-tracking logic applied to the session-based path, creating an unrestricted password-guessing channel. This maps to CWE-307: Improper Restriction of Excessive Authentication Attempts. The non-constant-time string comparison is a secondary weakness that may expose timing information and further reduces authentication robustness.

Potential impact

  • An attacker may recover the workspace access code through automated guessing
  • Successful authentication could grant full RoleAdministrator access to the kernel
  • Attackers could access, modify, or delete protected API-managed data
  • An attacker could alter application configuration or operational state
  • Compromise could enable further attacks against connected services or users

General mitigation guidance

Mitigation generally focuses on applying uniform authentication protections to every credential validation path.

Common defensive patterns include:

  • Enforcing rate limits, lockouts, progressive delays, and abuse detection for HTTP Basic Authentication as well as session login
  • Maintaining a shared failure counter and CAPTCHA or equivalent challenge policy across authentication mechanisms
  • Using constant-time credential comparisons where practical
  • Replacing shared access codes with individually attributable credentials or stronger authentication factors
  • Restricting administrative API exposure through network segmentation, reverse-proxy policy, and least privilege
  • Avoiding direct internet exposure of administrative interfaces unless strong compensating controls are present

How teams detect issues like this

Organizations commonly detect this weakness through:

  • Static analysis and code review checks that compare authentication branches for equivalent rate-limiting behavior
  • Review signals showing credential validation without failure counters, lockout checks, or progressive delay
  • Tests that issue repeated invalid Basic Authentication requests and verify that enforcement activates
  • Monitoring for high-volume authentication failures, repeated requests from one source, and distributed guessing patterns
  • Policy enforcement requiring administrative endpoints to use centralized authentication and abuse-prevention middleware
  • Automated security review tools that flag direct credential comparisons and authentication paths lacking throttling controls

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-w3xh-mmmh-r54v
vulncheck.comvulncheck.com/advisories/siyuan-before-authentication-bypass-via-http-basic-auth

Frequently asked

questions

Yes. If the SiYuan API surface is network-accessible, an unauthenticated remote attacker may submit automated Basic Authentication attempts without first obtaining an account.

No prior authenticated access is generally required. The attacker does need network reachability to the protected HTTP interface and must eventually guess the workspace access code.

Apply one centralized authentication policy to every login mechanism, including Basic Authentication, with shared failure tracking, throttling, lockout or challenge controls, and robust credential comparison.

Test every authentication branch for equivalent abuse protections, minimize public exposure of administrative APIs, use strong non-shared credentials or additional authentication factors, and monitor failed-login activity.

Find out what's already
exploitable in your codebase.