medium CVSS 6.5

CVE-2024-45308·MariaDB vulnerability

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`.

Severity
medium
Software
MariaDB
Fixed in
1.10.0
Published
2024-09-02

Affected versions

Until: 1.10.0

Fixed in: 1.10.0

How to fix this CVE

Upgrade HedgeDoc to version 1.10.0 or later to patch the alias collision vulnerability affecting MariaDB deployments. If immediate upgrade is not possible, disable the freeURL feature by setting `allowFreeURL` to `false`, or require authentication for freeURL note creation using the `requireFreeURLAuthentication` option to limit exposure to trusted users only.

sudo dnf update mariadb-server

Defensia detects this vulnerability

How to check if you are affected

  1. Step 1: Check HedgeDoc version with: grep -i version /path/to/hedgedoc/package.json | head -1
  2. Step 2: Verify if freeURL mode is enabled by checking your HedgeDoc config file for allowFreeURL=true or CMD_ALLOW_FREEURL environment variable set to true
  3. Step 3: Search HedgeDoc application logs for unusual note creation patterns: grep -i 'note.*created\|alias' /var/log/hedgedoc/*.log | grep -i lowercase
  4. Step 4: Query the MariaDB database to identify notes with duplicate aliases using case-insensitive matching: SELECT alias, COUNT(*) FROM notes GROUP BY LOWER(alias) HAVING COUNT(*) > 1;

FAQ

What is CVE-2024-45308?

CVE-2024-45308 is a vulnerability in HedgeDoc when running on MariaDB or MySQL that allows attackers to create note aliases matching the lowercased IDs of existing notes, effectively shadowing and hiding the original notes from users due to case-insensitive database matching.

Is CVE-2024-45308 being actively exploited?

No, CVE-2024-45308 is not listed on the CISA Known Exploited Vulnerabilities catalog and no public exploits are currently available, though the vulnerability is straightforward to exploit if conditions are met.

What versions of HedgeDoc are affected by CVE-2024-45308?

All versions of HedgeDoc prior to 1.10.0 are vulnerable when deployed with MariaDB or MySQL backends and the freeURL feature is enabled.

How do I check if my server is vulnerable to CVE-2024-45308?

Verify your HedgeDoc version (check package.json), confirm MariaDB/MySQL is in use, and check if freeURL mode is enabled via your config file or CMD_ALLOW_FREEURL environment variable.

Does Defensia detect CVE-2024-45308?

Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If HedgeDoc is installed on a monitored server, CVE-2024-45308 will appear in your dashboard with remediation steps.

Related MariaDB CVEs

CVE-2026-49261CVSS 10MariaDB server is a community developed fork of MySQL server. Versions 10.6.1 through 10.6.26, 10.11.1 through 10.11.17, 11.4.1 through 11.4.11, 11.8.1 through 11.8.7, and 12.3.1 with `wsrep_notify_cmd` enabled would execute shell commands embedded in the name of the joiner node. This is fixed in 10.6.27, 10.11.18, 11.4.12, 11.8.8, and 12.3.2. As a workaround, anyone who cannot upgrade now should disable `wsrep_notify_cmd`.
CVE-2026-44170CVSS 9.8MariaDB server is a community developed fork of MySQL server. From versions 10.6.1 to before 10.6.26, 10.11.1 to before 10.11.17, 11.4.1 to before 11.4.11, 11.8.1 to before 11.8.7, and 12.3.1, MariaDB on WIndows with installed CONNECT engine and enabled REST support interpolated table HTTP attribute into the curl command line without proper sanitizing. This allows the user to execute shell commands on the server. This issue has been patched in versions 10.6.26, 10.11.17, 11.4.11, 11.8.7, and 12.3.2.
CVE-2026-22730CVSS 8.8A critical SQL injection vulnerability in Spring AI's MariaDBFilterExpressionConverter allows attackers to bypass metadata-based access controls and execute arbitrary SQL commands. The vulnerability exists due to missing input sanitization.
CVE-2026-107815CVSS 8.5MariaDB server is a community developed fork of MySQL server. From 10.6.1 until 10.6.28, 10.11.19, 11.4.13, 11.8.9, 12.3.3, and 13.0.2, the CONNECT engine's DOS table type used an incorrect boundary check that permitted a one-byte null write beyond a stack buffer at an attacker-controlled offset. An authenticated user able to use the CONNECT engine could cause a crash and potentially remote code execution. This issue is fixed in versions 10.6.28, 10.11.19, 11.4.13, 11.8.9, 12.3.3, and 13.0.2.
CVE-2026-32710CVSS 8.5MariaDB server is a community developed fork of MySQL server. An authenticated user can crash MariaDB versions 11.4 before 11.4.10 and 11.8 before 11.8.6 via a bug in JSON_SCHEMA_VALID() function. Under certain conditions it might be possible to turn the crash into a remote code execution. These conditions require tight control over memory layout which is generally only attainable in a lab environment. This issue is fixed in MariaDB 11.4.10, MariaDB 11.8.6, and MariaDB 12.2.2.

References

Track CVEs across your fleet automatically

Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-45308. Free for 1 server.

Get started free