Instituto Nacional de ciberseguridad. Sección Incibe
Instituto Nacional de Ciberseguridad. Sección INCIBE-CERT

Vulnerabilidad en HedgeDoc (CVE-2023-38487)

Gravedad CVSS v3.1:
ALTA
Tipo:
No Disponible / Otro tipo
Fecha de publicación:
04/08/2023
Última modificación:
10/08/2023

Descripción

HedgeDoc is software for creating real-time collaborative markdown notes. Prior to version 1.9.9, the API of HedgeDoc 1 can be used 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. <br /> <br /> 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 by making a POST request to the `/new/[ALIAS]` API endpoint. The `[ALIAS]` parameter can be set to the ID of an existing note. HedgeDoc did not verify whether the provided `[ALIAS]` value corresponds to a valid ID of an existing note and always allowed creation of the new note. When a visitor tried to access the existing note, HedgeDoc will first search for a note with a matching alias before it searches using the ID, therefore only the new note can be accessed.<br /> <br /> Dependiendo de la configuración de permisos de la instancia de HedgeDoc, el problema puede ser explotado sólo por usuarios que hayan iniciado sesión o por todos los usuarios (incluidos los que no hayan iniciado sesión). El exploit requiere conocer el ID de la nota objetivo. Los atacantes podrían utilizar este problema para presentar al usuario una copia manipulada de la nota original, por ejemplo, sustituyendo los enlaces por otros maliciosos. Los atacantes también pueden utilizar este problema para impedir el acceso a la nota original, provocando una denegación de servicio. No se pierde ningún dato, ya que el contenido original de las notas afectadas sigue presente en la base de datos. <br /> <br /> Este problema se solucionó en la versión 1.9.9. Como solución provisional, desactivar el modo freeURL impide la explotación de este problema. El impacto puede limitarse restringiendo la creación de notas freeURL a usuarios de confianza que hayan iniciado sesión, habilitando `requireFreeURLAuthentication`/`CMD_REQUIRE_FREEURL_AUTHENTICATION`.

Productos y versiones vulnerables

CPE Desde Hasta
cpe:2.3:a:hedgedoc:hedgedoc:*:*:*:*:*:*:*:* 1.9.9 (excluyendo)