Skip to main content
EPSS 0.4%top 69%

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

0
High
Published: 09/04/2026 (09/04/2026, 17:25:11 UTC)
Source: GCVE Database
Product: github.com/enchant97/note-mark/backend

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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Passive
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

Goghsa
github.com/enchant97/note-mark/backend
Affected versions
<0.0.0-20260601210719-67b7de04308a

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

AILast updated: 09/07/2026, 11:05:54 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses