{"id":"CVE-2026-50553","title":"Note Mark is an open-source note-taking application","summary":"Note Mark is an open-source note-taking application. Prior to version 0.19.5, Note Mark validates book and note slug values with the OpenAPI/huma tag pattern:\"[a-z0-9-]+\". huma compiles this with regexp.MustCompile(s.Pattern) and tests i…","severity":"high","cwe":["CWE-20","CWE-22"],"vendor":"enchant97","product":"github.com/enchant97/note-mark/backend","affected":["github.com/enchant97/note-mark/backend < 0.0.0-20260601210719-67b7de04308a"],"patched":["github.com/enchant97/note-mark/backend 0.0.0-20260601210719-67b7de04308a"],"published":"2026-09-04","updated":"2026-09-09","sourceUpdated":"2026-09-09T21:09:13.080","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-50553","references":[{"url":"https://github.com/enchant97/note-mark/commit/67b7de04308a858ef27ceff87b514067b6d667e5","label":"security-advisories@github.com"},{"url":"https://github.com/enchant97/note-mark/releases/tag/v0.19.5","label":"security-advisories@github.com"},{"url":"https://github.com/enchant97/note-mark/security/advisories/GHSA-rqrh-8wpv-x7hh","label":"security-advisories@github.com"},{"url":"https://github.com/enchant97/note-mark/security/advisories/GHSA-rqrh-8wpv-x7hh","label":"134c704f-9b21-4f2e-91b3-4a467353bcc0"},{"url":"https://github.com/advisories/GHSA-rqrh-8wpv-x7hh"}],"tags":["nvd","ghsa","go"],"epss":0.00459,"epssPercentile":0.37033,"aliases":["GHSA-rqrh-8wpv-x7hh"],"ecosystem":"go","ingestedAt":"2026-07-09T13:51:05.182Z","slug":"CVE-2026-50553","body":"## Overview\n\nNote Mark is an open-source note-taking application. Prior to version 0.19.5, Note Mark validates book and note slug values with the OpenAPI/huma tag pattern:\"[a-z0-9-]+\". huma compiles this with regexp.MustCompile(s.Pattern) and tests it with patternRe.MatchString(str), an UNANCHORED match. Because the pattern is not anchored (^...$), any string that merely CONTAINS one [a-z0-9-] substring passes validation. A slug such as ../../../../../../tmp/escape is accepted and stored verbatim. The data-export CLI commands (note-mark migrate export and note-mark migrate export-v1) join these unsanitized slugs straight into the output path with path.Join / filepath.Join, then os.MkdirAll the directory and os.Create the note file. path.Join resolves the ../ segments, so the note content file is written OUTSIDE the configured export directory. The export process commonly runs as root (default in Docker / bare-metal admin usage), so this is a root-privilege arbitrary directory create + file write. This issue has been patched in version 0.19.5.\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.\n\n## Package advisory (CVE-2026-50553)\n\nAffected packages:\n\n- `github.com/enchant97/note-mark/backend < 0.0.0-20260601210719-67b7de04308a`\n\nPatched in:\n\n- `github.com/enchant97/note-mark/backend 0.0.0-20260601210719-67b7de04308a`\n\nSource: https://github.com/advisories/GHSA-rqrh-8wpv-x7hh","depth":"twilight","depthScore":41,"depthScoreParts":{"impact":41.3,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}