# CVE-2026-50553: Note Mark: Path traversal via unsanitized book/note slug in migrate export (sibling of GHSA-g49p)

- Severity: High 8.6 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.38%, higher than 33% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-09T13:41:35.000Z
- Modified: 2026-09-09T21:09:13.080Z
- Also known as: GHSA-rqrh-8wpv-x7hh, GO-2026-5949
- Weaknesses: CWE-20, CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- enchant97 note-mark: < 0.19.5
- github.com/enchant97/note-mark/backend (Go): before 0.0.0-20260601210719-67b7de04308a

## Every score

- GitHub_M: CVSS:4.0 8.6 High `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`
- GitHub: CVSS:4.0 High `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`

## References

- <https://github.com/enchant97/note-mark/security/advisories/GHSA-rqrh-8wpv-x7hh> (exploit, advisory, web)
- <https://github.com/enchant97/note-mark/commit/67b7de04308a858ef27ceff87b514067b6d667e5> (web)
- <https://github.com/enchant97/note-mark/releases/tag/v0.19.5>
- <https://github.com/enchant97/note-mark> (package)

## Sources

- CVE List: [CVE-2026-50553](https://www.cve.org/CVERecord?id=CVE-2026-50553), CVE Terms of Use, modified 2026-09-04
- GitHub Advisory Database: [GHSA-rqrh-8wpv-x7hh](https://github.com/advisories/GHSA-rqrh-8wpv-x7hh), CC-BY-4.0, modified 2026-07-21
- Go Vulnerability Database: [GO-2026-5949](https://pkg.go.dev/vuln/GO-2026-5949), CC-BY-4.0, modified 2026-07-21
- NVD: [CVE-2026-50553](https://nvd.nist.gov/vuln/detail/CVE-2026-50553), Public domain, modified 2026-09-09

---

Page: https://cve.day/CVE-2026-50553 · Whole record: https://cve.day/CVE-2026-50553.json · Rebuilt by cve.day 2026-11-25T22:59:36.377Z
