🔍 CVE-2024-45308

6.5
CVSS Score
MEDIUM
2024-09-02
2026-06-17 07:53
✅ 완료

🇰🇷 한글 설명

HedgeDoc에서 MySQL 또는 MariaDB를 사용할 때, 기존 노트의 ID와 대소문자 구분 없이 일치하는 별칭(alias)을 가진 새 노트를 생성하여 기존 노트를 가릴 수 있는 취약점입니다. freeURL 기능이 활성화된 경우 공격자는 특정 ID를 알고 있다면 조작된 노트를 노출시켜 피싱 공격을 수행하거나 서비스 거부(DoS)를 유발할 수 있습니다.

💡 쉬운 설명

기존에 있던 메모와 이름이 비슷하게 겹치는 가짜 메모를 만들어, 사용자가 진짜 메모 대신 가짜 메모를 보게 만드는 공격입니다. 이를 통해 가짜 링크로 유도하거나 원래 메모를 못 보게 방해할 수 있습니다.

🇺🇸 원문 (English)

HedgeDoc is an open source, real-time, collaborative, markdown notes application. When using HedgeDoc 1 with MySQL or MariaDB, it is possible to create notes with an alias matching the ID of existing notes. The affected existing note can then not be accessed anymore and is effectively hidden by the new one. When the freeURL feature is enabled (by setting the `allowFreeURL` config option or the `CMD_ALLOW_FREEURL` environment variable to `true`), any user with the appropriate permissions can create a note with an arbitrary alias, e.g. by accessing it in the browser. When MySQL or MariaDB are used, it is possible to create a new note with an alias that matches the lower-cased ID of a different note. HedgeDoc then always presents the new note to users, as these databases perform case-insensitive matching and the lower-cased alias is found first. This issue only affects HedgeDoc instances that use MySQL or MariaDB. Depending on the permission settings of the HedgeDoc instance, the issue can be exploited only by logged-in users or by all (including non-logged-in) users. The exploit requires knowledge of the ID of the target note. Attackers could use this issue to present a manipulated copy of the original note to the user, e.g. by replacing the links with malicious ones. Attackers can also use this issue to prevent access to the original note, causing a denial of service. No data is lost, as the original content of the affected notes is still present in the database. Users are advised to upgrade to version 1.10.0 which addresses this issue. Users unable to upgrade may disable freeURL mode which prevents the exploitation of this issue. The impact can also be limited by restricting freeURL note creation to trusted, logged-in users by enabling `requireFreeURLAuthentication`/`CMD_REQUIRE_FREEURL_AUTHENTICATION`.

📍 영향받는 시스템

HedgeDoc 1.x 버전 중 MySQL 또는 MariaDB를 사용하는 환경 (freeURL 기능 활성화 시)

⚔️ 공격 벡터

대상 노트의 ID를 파악한 후, 대소문자 구분 없는 별칭을 사용하여 중복된 ID를 가진 새 노트를 생성

🛡️ 대응 방법

HedgeDoc를 1.10.0 버전 이상으로 업그레이드하거나, freeURL 모드를 비활성화 또는 인증을 필수화함

🔧 검증 코드

출력된 버전 정보가 1.10.0 미만이면 취약한 상태이며, 1.10.0 이상이면 안전합니다.

Shell / Script
curl -s http://<HedgeDoc_URL>/version | grep -E '1\.[0-9]{2,}'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:L

💻 영향받는 소프트웨어

MariaDB