CVE-2026-50553

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

Published Sep 4, 2026 CVSS 4.0 · 8.6 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Note Mark accepts book and note slugs without proper anchoring, allowing any string that contains a single allowed character to pass validation. An attacker can craft a slug containing traversal sequences such as ../../../../../../tmp/escape, which the export command writes to the filesystem using path.Join. The resulting file is created outside the intended export directory, giving write access in a location the user has root privileges to. The impact is the ability for an attacker with access to run the export process to create or overwrite files wherever the application’s process runs, potentially installing malicious code or modifying critical files. Because many deployments run the exporter as root or within a privileged Docker container, this leads to a high‑severity root‑level compromise. The vulnerability is a classic directory traversal/unsafe path concatenation flaw anchored in the OpenAPI/huma slug pattern, exposing the application to unauthorized file creation and arbitrary code execution under a privileged context.

Affected Systems

The affected product is Note Mark, an open‑source note‑taking application published by enchant97. Versions prior to 0.19.5, including 0.19.4 and earlier, are vulnerable. The bug is fixed in release 0.19.5.

Risk and Exploitability

The CVSS score of 8.6 reflects the high impact and moderate complexity. No EPSS score is published. The bug is not currently listed in the CISA KEV catalog. The attacker would need to trigger the data‑export CLI that runs as root, which is often the case in default Docker or bare‑metal setups. Once the export is invoked with a crafted slug, the application writes files to arbitrary directories, enabling root‑level code execution or persistence. The vulnerability is exploitable in a local or privileged context and can have system‑wide effects.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Note Mark to version 0.19.5 or later.
  • Disable or restrict the migrate export CLI (or run it under a non‑root user) until the patch is applied.
  • If an upgrade is impossible, mitigate by configuring the application to validate slugs strictly (e.g., enforce full-string anchoring) or by restricting the export directory to a safe path and auditing any writes outside this directory.

Generated by OpenCVE AI on September 4, 2026 at 19:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-rqrh-8wpv-x7hh Note Mark: Path traversal via unsanitized book/note slug in migrate export (sibling of GHSA-g49p)
History
Type Values Removed Values Added
First Time appeared Enchant97
Enchant97 note-mark
Vendors & Products Enchant97
Enchant97 note-mark
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Note Mark: Path traversal via unsanitized book/note slug in migrate export (sibling of GHSA-g49p)
Weaknesses CWE-20
CWE-22
References
Metrics cvssV4_0

{'score': 8.6, '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'}

Weaknesses
  • CWE-20

    Improper Input Validation

  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 4, 2026, 5:46 PM
Reserved
Jun 4, 2026, 8:37 PM
Status
Deferred
Published
Sep 4, 2026, 6:17 PM
Modified
Sep 9, 2026, 9:09 PM