Backend: Note Mark: Path traversal via unsanitized book/note slug in migrate export (sibling of GHSA-g49p) (CVE-2026-50553)
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.
AI Analysis
Technical Summary
Note Mark is an open-source note-taking application. Before version 0.19.5, it validates book and note slug values with an unanchored regex pattern "[a-z0-9-]+", which allows any string containing a matching substring to pass validation. This permits slugs like '../../../../../../tmp/escape' to be accepted and stored verbatim. The migrate export CLI commands join these unsanitized slugs into output paths using path.Join/filepath.Join, which resolves '../' sequences, resulting in files being written outside the intended export directory. Since the export process commonly runs as root, this leads to a root-privilege arbitrary directory creation and file write vulnerability. The issue is fixed in version 0.19.5.
Potential Impact
An attacker can craft malicious book or note slugs containing path traversal sequences that bypass validation and cause the export process to write files outside the designated export directory. Because the export process often runs with root privileges, this can lead to arbitrary file creation or overwriting with root-level permissions, potentially compromising system integrity or security.
Mitigation Recommendations
This vulnerability is patched in Note Mark version 0.19.5. Users should upgrade to version 0.19.5 or later to remediate this issue. No additional mitigation steps are required if the upgrade is applied.
Backend: Note Mark: Path traversal via unsanitized book/note slug in migrate export (sibling of GHSA-g49p) (CVE-2026-50553)
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.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Note Mark is an open-source note-taking application. Before version 0.19.5, it validates book and note slug values with an unanchored regex pattern "[a-z0-9-]+", which allows any string containing a matching substring to pass validation. This permits slugs like '../../../../../../tmp/escape' to be accepted and stored verbatim. The migrate export CLI commands join these unsanitized slugs into output paths using path.Join/filepath.Join, which resolves '../' sequences, resulting in files being written outside the intended export directory. Since the export process commonly runs as root, this leads to a root-privilege arbitrary directory creation and file write vulnerability. The issue is fixed in version 0.19.5.
Potential Impact
An attacker can craft malicious book or note slugs containing path traversal sequences that bypass validation and cause the export process to write files outside the designated export directory. Because the export process often runs with root privileges, this can lead to arbitrary file creation or overwriting with root-level permissions, potentially compromising system integrity or security.
Mitigation Recommendations
This vulnerability is patched in Note Mark version 0.19.5. Users should upgrade to version 0.19.5 or later to remediate this issue. No additional mitigation steps are required if the upgrade is applied.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-rqrh-8wpv-x7hh
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-50553"]
- Ecosystems
- ["Go"]
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
Threat ID: 6a50bac868715ace435892b3
Added to database: 07/10/2026, 09:26:32 UTC
Last enriched: 09/07/2026, 11:05:54 UTC
Last updated: 09/13/2026, 06:18:08 UTC
Views: 175
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.