Mend.io Vulnerability Database
The largest open source vulnerability database
What is a Vulnerability ID?
New vulnerability? Tell us about it!
CVE-2026-50553
Published:July 09, 2026
Updated:August 27, 2026
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 is the unguarded sibling of GHSA-g49p-4qxj-88v3 (CVE class CWE-22 in the same export sinks). That fix added "filepath.Base(asset.Name)" to sanitize the asset filename, but the adjacent path components "book.Slug" and "note.Slug" — used in the very same "path.Join" calls in the same two export functions — were left raw, and their input-side "pattern" guard is bypassable as shown above.
Affected Packages
github.com/enchant97/note-mark/backend (GO):
Affected version(s) >=v0.0.0-20230525112230-15371b9e4a02 <v0.0.0-20260601210719-67b7de04308a
Fix Suggestion:
Update to version v0.0.0-20260601210719-67b7de04308a
Do you need more information?
Contact Us
CVSS v4
Base Score:
8.6
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
LOW
User Interaction
PASSIVE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
HIGH
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
8
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
LOW
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Weakness Type (CWE)
Improper Input Validation
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')