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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.6
- **CVSS:** 8.6 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: None; Privileges required: Low; User interaction: Passive; Confidentiality impact: High; Integrity impact: High; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.46% (percentile 32, 2026-11-28)
- **CWE:** CWE-20, CWE-22
- **Aliases:** GHSA-rqrh-8wpv-x7hh, GO-2026-5949
- **Published:** 2026-07-09T13:41:35.000Z
- **Modified:** 2026-09-09T21:09:13.080Z

## Who should check

- Projects that depend on Go package github.com/enchant97/note-mark/backend (\< 0.0.0-20260601210719-67b7de04308a)
- Anyone running enchant97 note-mark \< 0.19.5

## 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.

## Affected and fixed versions

- Go `github.com/enchant97/note-mark/backend`: affected \< 0.0.0-20260601210719-67b7de04308a; fixed 0.0.0-20260601210719-67b7de04308a (osv)
- enchant97 note-mark: \< 0.19.5 (cvelist)

## Mitigation

- Upgrade github.com/enchant97/note-mark/backend to 0.0.0-20260601210719-67b7de04308a or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-50553. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-50553.md
Affected: github.com/enchant97/note-mark/backend < 0.0.0-20260601210719-67b7de04308a
Fixed in: 0.0.0-20260601210719-67b7de04308a

Steps:
1. Search this machine and project for github.com/enchant97/note-mark/backend (Go), enchant97 note-mark: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-50553 being exploited?

There is no confirmed exploitation: CVE-2026-50553 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.46% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-50553?

High: CVSS 8.6 (v4.0, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-50553?

github.com/enchant97/note-mark/backend \< 0.0.0-20260601210719-67b7de04308a.

### Is there a fix for CVE-2026-50553?

Yes. Fixed in 0.0.0-20260601210719-67b7de04308a. Upgrade github.com/enchant97/note-mark/backend to 0.0.0-20260601210719-67b7de04308a or later.

### How do I check if I'm affected by CVE-2026-50553?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/enchant97/note-mark/security/advisories/GHSA-rqrh-8wpv-x7hh>
- patch: <https://github.com/enchant97/note-mark/commit/67b7de04308a858ef27ceff87b514067b6d667e5>
- other: <https://github.com/enchant97/note-mark/releases/tag/v0.19.5>
- other: <https://github.com/enchant97/note-mark>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-50553>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-rqrh-8wpv-x7hh> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GO-2026-5949> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-50553> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-50553>
