🔍 CVE-2026-50553

0.0
CVSS Score
UNKNOWN
2026-09-04
2026-09-09 21:09
✅ 완료

🇰🇷 한글 설명

Note Mark 0.19.5 미만 버전에서 슬러그 값 검증 시 정규표현식 앵커(^, $)가 누락되어 경로 조작 공격이 가능합니다. 공격자가 ../와 같은 경로 탐색 문자를 포함한 슬러그를 입력하면, 데이터 내보내기 명령 실행 시 설정된 디렉토리를 벗어나 시스템의 임의 위치에 파일을 생성할 수 있습니다.

💡 쉬운 설명

메모 앱의 이름 규칙 검사가 허술하여, 공격자가 특수 문자를 이용해 시스템의 엉뚱한 곳에 파일을 만들 수 있는 취약점입니다. 특히 관리자 권한으로 실행될 경우 시스템 전체가 위험해질 수 있습니다.

🇺🇸 원문 (English)

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.

📍 영향받는 시스템

Note Mark version < 0.19.5

⚔️ 공격 벡터

조작된 슬러그(path traversal)를 포함한 데이터 내보내기(export) 명령 실행

🛡️ 대응 방법

Note Mark를 0.19.5 이상의 최신 버전으로 업데이트하십시오.

🔧 검증 코드

출력된 버전이 0.19.5 미만이면 취약한 상태입니다.

Shell / Script
note-mark --version | grep -E '0\.(1[0-8]|20)'

💻 영향받는 소프트웨어

Docker