Note Mark JWT Secret Weakness Allows Account Takeover
Note Mark is vulnerable to a JWT secret weakness that allows for full account takeover via token forgery by accepting secrets as short as 1 byte, enabling attackers to crack the signing secret offline and forge valid JWTs for any user.
Note Mark is vulnerable to a critical security flaw related to the handling of JWT secrets. Specifically, the application does not enforce a minimum length or entropy on the JWT_SECRET configuration value. This means that the application accepts any base64-decodable secret, regardless of its size, even secrets as short as a single byte. According to RFC 7518 Section 3.2, HS256 keys must be at least 256 bits (32 bytes), but this is not enforced in Note Mark. This vulnerability, identified as CVE-2026-44523, allows attackers to compromise user accounts completely.
Attack Chain
- Deploy a vulnerable instance of Note Mark with a weak
JWT_SECRET(less than 32 bytes after base64 decoding). - An attacker registers a new user account on the vulnerable Note Mark instance.
- The attacker captures a valid
Auth-Session-Tokencookie from the registration or login process. - The attacker uses offline brute-force or dictionary attacks to crack the weak signing secret, such as using a Python script to decode the token with different secret values.
- Once the secret is recovered, the attacker forges a new JWT for an arbitrary user UUID, potentially including an administrator account, and extends the expiry time.
- The attacker sends the forged token in a request to the server.
- The server incorrectly validates the forged token due to the compromised secret.
- The server returns a 200 OK response, authenticating the attacker as the targeted user, granting unauthorized access to sensitive data and functionality.
Impact
Successful exploitation of this vulnerability allows an attacker to perform full account takeover across the entire Note Mark application. The attacker can forge valid JWTs for any user, including administrators, without needing to know any actual user credentials. There is no server-side detection or rate-limiting possible, allowing the attacker to gain complete control over user accounts and data, potentially leading to data breaches, unauthorized modifications, and complete system compromise.
Recommendation
- Enforce a minimum length of 32 bytes (256 bits) for JWT secrets after base64 decoding to prevent brute-force attacks. This directly addresses the core vulnerability (CVE-2026-44523).
- Reject weak secrets during configuration parsing within the
Base64Decoded.UnmarshalTextfunction or during config validation to prevent deployment with insecure secrets. - Deploy the Sigma rule
Detect Weak JWT Secret Usageto identify potentially vulnerable Note Mark instances that do not meet the minimum key size requirements.
Detection coverage 2
Detect Weak JWT Secret Usage
highDetects Note Mark instances using JWT secrets shorter than 32 bytes after base64 decoding, indicating a potential vulnerability to CVE-2026-44523.
Detect JWT Forgery Attempts via Unexpected User-Agent
lowDetects potential JWT forgery attempts by monitoring user agents associated with forged tokens. This rule may help identify unexpected user agent strings.
Detection queries are available on the platform. Get full rules →