{"id":"CVE-2026-44523","aliases":["CVE-2026-44523","GHSA-q6mh-rqwh-g786","GO-2026-5567"],"related":[],"kind":"vulnerability","state":"published","title":"Note Mark: JWT Secret Weakness allows Full Account Takeover via token forgery","summary":"Note Mark is an open-source note-taking application. Prior to 0.19.4, no minimum length or entropy is enforced on the JWT_SECRET configuration value. The application accepts any base64-decodable secret regardless of size, including secrets as short as 1 byte. This vulnerability is fixed in 0.19.4.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Note Mark is an open-source note-taking application. Prior to 0.19.4, no minimum length or entropy is enforced on the JWT_SECRET configuration value. The application accepts any base64-decodable secret regardless of size, including secrets as short as 1 byte. This vulnerability is fixed in 0.19.4.","source":"cvelist"},{"lang":"en","text":"#### Summary\n\nNo minimum length or entropy is enforced on the `JWT_SECRET` configuration value. The application accepts any base64-decodable secret regardless of size, including secrets as short as 1 byte.\n\nHS256 secrets below 32 bytes are brute-forceable offline, allowing attackers to recover the signing key and forge valid JWTs for arbitrary users.\n\n---\n\n#### Impact\n\nAn attacker who captures a single valid JWT (e.g, from cookies, logs, or network traffic) can:\n\n\\> Crack the signing secret offline using brute-force or wordlist attacks\n\\> Forge valid JWTs for any user ID (including administrators)\n\\> Authenticate without knowing any credentials\n\nThis results in **full account takeover across the entire application** with no server-side detection or rate limiting possible.\n\n---\n\n#### Details\n\nIn `backend/config/utils.go`, the `Base64Decoded.UnmarshalText` function decodes the JWT secret but does not validate its length or entropy.\n\nIn `backend/core/auth.go`, JWT tokens are signed using HS256 without enforcing minimum key size requirements.\n\nAccording to **RFC 7518 Section 3.2**, HS256 keys must be at least 256 bits (32 bytes). Libraries such as PyJWT explicitly warn against shorter keys, but note-mark performs no such validation.\n\n---\n\n### PoC\n\n1- Deploy note-mark with a weak secret:\n\n   ```\n   JWT_SECRET = base64(\"testsecret123456789012345\")\n   ```\n\n2- Register an account and capture the `Auth-Session-Token` cookie\n\n3- Crack the secret offline (example using Python):\n\n   ```python\n   import jwt, base64\n   jwt.decode(TOKEN, base64.b64decode(SECRET), algorithms=[\"HS256\"])\n   ```\n\n4- Forge a new token for any user UUID with extended expiry\n\n5- Send the forged token in requests → server returns **200 Ok** and authenticates as that user\n\n---\n\n### Reproduction Steps\n\n1- Deploy the application with a JWT secret shorter than 32 bytes (after base64 decoding)\n2- Authenticate and capture a valid JWT\n3- Perform offline brute-force or dictionary attack against the token signature\n4- Recover the secret\n5- Generate a forged JWT for another user\n6- Use the forged token to access protected endpoints\n\n---\n\n### Fix Recommendation\n\n* Enforce a **minimum of 32 bytes (256 bits)** for JWT secrets after base64 decoding\n* Reject weak secrets during configuration parsing (e.g., in `Base64Decoded.UnmarshalText` or config validation)\n* Optionally log warnings or fail startup if the secret is insecure\n\n---\n\n### Resources\n\n* RFC 7518 Section 3.2 (JSON Web Algorithms - HMAC key size requirements)\n* CWE-326: Inadequate Encryption Strength\n* CWE-345: Insufficient Verification of Data Authenticity\n\n---","format":"markdown","source":"ghsa"},{"lang":"en","text":"Note Mark has a JWT Secret Weakness that allows Full Account Takeover via Token Forgery in github.com/enchant97/note-mark/backend","format":"markdown","source":"go"},{"lang":"es","text":"Note Mark es una aplicación de código abierto para tomar notas. Antes de la 0.19.4, no se aplica una longitud mínima ni una entropía al valor de configuración JWT_SECRET. La aplicación acepta cualquier secreto decodificable en base64, independientemente de su tamaño, incluyendo secretos de tan solo 1 byte. Esta vulnerabilidad se corrige en la versión 0.19.4.","source":"nvd"}],"published":"2026-05-07T21:08:10.000Z","modified":"2026-10-26T14:10:00.130Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","score":10,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","score":10,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","score":10,"rating":"CRITICAL"}],"cwes":["CWE-326","CWE-345"],"affected":[{"ranges":[{"version":"< 0.19.4","status":"affected"}],"vendor":"enchant97","product":"note-mark","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20260501152247-18b587758667"}],"ecosystem":"Go","package":"github.com/enchant97/note-mark/backend","purl":"pkg:golang/github.com/enchant97/note-mark/backend","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20260501152247-18b587758667"}],"ecosystem":"Go","package":"github.com/enchant97/note-mark/backend","purl":"pkg:golang/github.com/enchant97/note-mark/backend","source":"go"}],"references":[{"url":"https://github.com/enchant97/note-mark/security/advisories/GHSA-q6mh-rqwh-g786","tags":["advisory","exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44523","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/enchant97/note-mark/commit/18b58775866776ed400c403dd0ccad68c1fa4802","tags":["web"],"sources":["ghsa","go"]},{"url":"https://github.com/enchant97/note-mark","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/enchant97/note-mark/releases/tag/v0.19.4","tags":["web"],"sources":["ghsa","go"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2026-05-15T14:54:44.490Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-44523","url":"https://www.cve.org/CVERecord?id=CVE-2026-44523","licence":"CVE Terms of Use","modified":"2026-05-15T14:55:08.782Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-q6mh-rqwh-g786","url":"https://github.com/advisories/GHSA-q6mh-rqwh-g786","licence":"CC-BY-4.0","modified":"2026-06-25T23:11:07.625Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5567","url":"https://pkg.go.dev/vuln/GO-2026-5567","licence":"CC-BY-4.0","modified":"2026-06-25T23:01:23.209Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-44523","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44523","licence":"Public domain","modified":"2026-10-26T14:10:00.130Z"}],"updatedAt":"2026-11-25T22:59:21.747Z","epss":{"score":0.00148,"percentile":0.04191,"date":"2026-12-02T12:00:21.000Z"}}