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.
Published: 2026-09-04
Score: 8.6 High
EPSS: < 1% Very Low
KEV: No
Impact: Privilege Escalation
Action: Apply Patch
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

Fri, 04 Sep 2026 22:15:00 +0000

Type Values Removed Values Added
First Time appeared Enchant97
Enchant97 note-mark
Vendors & Products Enchant97
Enchant97 note-mark

Fri, 04 Sep 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Fri, 04 Sep 2026 17:30:00 +0000

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'}


Subscriptions

Enchant97 Note-mark
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-04T17:46:40.884Z

Reserved: 2026-06-04T20:37:18.654Z

Link: CVE-2026-50553

cve-icon Vulnrichment

Updated: 2026-09-04T17:46:35.651Z

cve-icon NVD

Status : Deferred

Published: 2026-09-04T18:17:52.203

Modified: 2026-09-09T21:09:13.080

Link: CVE-2026-50553

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-04T22:00:05Z

Weaknesses
  • CWE-20

    Improper Input Validation

  • CWE-22

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