{"id":"CVE-2026-50553","published":"2026-09-04T17:25:11Z","modified":"2026-09-04T17:46:40Z","title":"Note Mark: Path traversal via unsanitized book/note slug in migrate export (sibling of GHSA-g49p)","vendor":"enchant97","product":"note-mark","tier":"tail","description":{"text":"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 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.6,"severity":"HIGH","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00459,"percentile":0.31725,"provenance":"source"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"},{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/enchant97/note-mark/security/advisories/GHSA-rqrh-8wpv-x7hh","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/enchant97/note-mark/commit/67b7de04308a858ef27ceff87b514067b6d667e5","tags":["x_refsource_MISC"]},{"url":"https://github.com/enchant97/note-mark/releases/tag/v0.19.5","tags":["x_refsource_MISC"]}],"priority":{"score":12.4,"factors":[{"name":"EPSS percentile","points":6.34},{"name":"CVSS severity","points":6.02}]},"vendorSlug":"enchant97","affectedVersions":[{"vendor":"enchant97","product":"note-mark","versions":["< 0.19.5"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-09-04T17:46:26.605003Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/enchant97/note-mark/backend","vulnerableRanges":["<0.0.0-20260601210719-67b7de04308a"],"patched":["0.0.0-20260601210719-67b7de04308a"],"from":["GHSA-rqrh-8wpv-x7hh","GO-2026-5949"],"provenance":"source"}],"summary":{"text":"Note Mark's book and note slug validation in the migrate export commands (note-mark migrate export and export-v1) uses an unanchored regular expression, so slugs containing path traversal sequences such as \"../\" are accepted and then joined into the export output path without sanitization. An attacker who can supply slug values, with low privileges and user interaction required, can write directories and files outside the configured export directory, which may run with root privileges in common deployments.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:34:42Z"},"euvd":{"id":"EUVD-2026-71618","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-41571","published":"2026-05-04","fixed":"0.0.0-20260417132909-dea5530cc989","kev":false},{"cve":"CVE-2026-44522","published":"2026-05-14","fixed":"0.0.0-20260501152243-db3f72bff780","kev":false},{"cve":"CVE-2026-44523","published":"2026-05-14","fixed":"0.0.0-20260501152247-18b587758667","kev":false,"link":{"from":"CVE-2026-44523","to":"CVE-2026-50553","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/enchant97/note-mark/backend","fromFixed":"0.0.0-20260501152247-18b587758667","toFixed":"0.0.0-20260601210719-67b7de04308a","daysApart":113}]}},{"cve":"CVE-2026-50553","published":"2026-09-04","fixed":"0.0.0-20260601210719-67b7de04308a","kev":false},{"cve":"CVE-2026-50554","published":"2026-09-03","fixed":"0.0.0-20260601210758-9c9b72740f22","kev":false,"link":{"from":"CVE-2026-50553","to":"CVE-2026-50554","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/enchant97/note-mark/backend","fromFixed":"0.0.0-20260601210719-67b7de04308a","toFixed":"0.0.0-20260601210758-9c9b72740f22","daysApart":-1}]}},{"cve":"CVE-2026-40263","published":"2026-04-16","fixed":"0.19.2-0.20260411145025-cf4c6f6acf70","kev":false}],"package":"Go:github.com/enchant97/note-mark/backend"}}