CVE-2026-134249
Summary
by MITRE • 11/21/2026
SiYuan before 3.8.10 contains an authentication bypass vulnerability that allows unauthenticated attackers to gain Administrator role by spoofing X-Forwarded-For through a loopback-trusted reverse proxy. Attackers can send requests with Host set to localhost and X-Forwarded-For set to 127.0.0.1 to read private note-history contents via the /history/*path route when no lock-screen password is set.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 11/21/2026
SiYuan, a popular open-source privacy-focused knowledge management tool, suffered from a critical authentication bypass vulnerability in versions prior to 3.8.10 that allowed unauthenticated attackers to escalate privileges and access sensitive data. The core of this flaw lies in the application's trust model regarding reverse proxy headers, specifically how it handles the X-Forwarded-For header when determining client identity for administrative functions. In many modern web architectures, applications running behind a load balancer or reverse proxy rely on these headers to identify the original IP address of the requester. However, SiYuan incorrectly trusted any request where the Host header was set to localhost and the X-Forwarded-For header indicated a loopback address such as 127.0.0.1. This logic flaw effectively bypassed standard authentication mechanisms because the application assumed that traffic originating from or appearing to originate from the local machine must be legitimate administrative access, ignoring the reality that an attacker on the same network could spoof these headers if they had any level of HTTP request injection capability or were exploiting a separate vector like SSRF.
The operational impact of this vulnerability was severe, particularly for users who did not have a lock-screen password enabled in their SiYuan instance. By sending crafted requests with the Host header set to localhost and the X-Forwarded-For header spoofed to 127.0.0.1, an attacker could trick the server into treating them as a local administrator. This privilege escalation granted full administrative control over the application environment. Once elevated to the Administrator role, the attacker gained unrestricted access to all user data stored within the SiYuan instance. Most critically, this included private note-history contents accessible via the /history/*path route. Since history endpoints often contain previous versions of notes and potentially sensitive information that users might have deleted or edited, this exposure represented a significant breach of confidentiality. The vulnerability essentially rendered any local authentication measures ineffective for those who relied solely on application-level login without additional network-layer protections or lock-screen passwords.
From a technical classification perspective, this issue aligns with CWE-287 Improper Authentication and CWE-346 Origin Validation Error. The failure to properly validate the origin of administrative requests based on spoofable headers is a classic example of trusting client-supplied data without sufficient verification against trusted sources like actual network interfaces or internal proxy configurations. In terms of offensive security frameworks, this vulnerability facilitates actions consistent with MITRE ATT&CK technique T1078 Valid Accounts and specifically T1534 Internal Spearphishing if the attack vector involved social engineering to get a user to click a malicious link that triggered such requests in their browser context due to same-origin policy limitations or CORS misconfigurations. However, given the header spoofing nature, it more directly relates to improper validation of proxy headers which can be exploited via SSRF-like conditions or direct network access if the application is exposed without proper WAF rules blocking loopback-spoofed requests from external sources.
Mitigation for this vulnerability requires immediate upgrading to SiYuan version 3.8.10 or later, where the developers have corrected the logic surrounding header validation and administrative privilege checks. Administrators should also implement defense-in-depth strategies by ensuring that applications are not directly exposed to untrusted networks without a reverse proxy that strips or validates X-Forwarded-For headers appropriately. It is crucial for system administrators to configure their web servers, such as Nginx or Apache, to only accept the X-Forwarded-For header from trusted upstream proxies and ignore it if received directly from external clients. Additionally, enforcing lock-screen passwords adds an extra layer of security that can mitigate some risks associated with session hijacking or unauthorized access attempts, although this is a compensating control rather than a fix for the underlying code flaw. Regular auditing of authentication flows and strict adherence to zero-trust principles where no header is trusted by default are essential practices in maintaining robust application security posture against such bypass techniques.