CVE-2021-43855
JSON

8.2high

Stored XSS via SVG in Requarks/wiki

Severity
8.2high CVSS:3.1 by GitHub_M
Exploit likelihood
0.92% (higher than 58% of CVEs)
Published
Last changed
Assigned by
GitHub_M

Description

Wiki.js is a wiki app built on node.js. Wiki.js 2.5.263 and earlier is vulnerable to stored cross-site scripting through a SVG file upload made via a custom request with a fake MIME type. By creating a crafted SVG file, a malicious Wiki.js user may stage a stored cross-site scripting attack. This allows the attacker to execute malicious JavaScript when the SVG is viewed directly by other users. Scripts do not execute when loaded inside a page via normal `<img>` tags. The malicious SVG can only be uploaded by crafting a custom request to the server with a fake MIME type. A patch in version 2.5.264 fixes this vulnerability by adding an additional file extension verification check to the optional (enabled by default) SVG sanitization step to all file uploads that match the SVG mime type. As a workaround, disable file upload for all non-trusted users.

Affected

Product or packageVersionsReported by
Requarks wiki< 2.5.264CVE List
requarks wiki.jsbefore 2.5.264NVD

All scores

GitHub_M8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
NVD5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
NVD3.5low CVSS:2.0AV:N/AC:M/Au:S/C:N/I:P/A:N

Classification

What each source says

CVE List

Wiki.js is a wiki app built on node.js. Wiki.js 2.5.263 and earlier is vulnerable to stored cross-site scripting through a SVG file upload made via a custom request with a fake MIME type. By creating a crafted SVG file, a malicious Wiki.js user may stage a stored cross-site scripting attack. This allows the attacker to execute malicious JavaScript when the SVG is viewed directly by other users. Scripts do not execute when loaded inside a page via normal `<img>` tags. The malicious SVG can only be uploaded by crafting a custom request to the server with a fake MIME type. A patch in version 2.5.264 fixes this vulnerability by adding an additional file extension verification check to the optional (enabled by default) SVG sanitization step to all file uploads that match the SVG mime type. As a workaround, disable file upload for all non-trusted users.

NVD (es)

Wiki.js es una aplicación wiki construida sobre node.js. Wiki.js versiones 2.5.263 y anteriores, es vulnerable a un ataque de tipo cross-site scripting almacenado por medio de una carga de archivos SVG realizada por medio de una petición personalizada con un tipo MIME falso. Al crear un archivo SVG diseñado, un usuario malicioso de Wiki.js puede llevar a cabo un ataque de tipo Cross-site scripting almacenado. Esto permite al atacante ejecutar JavaScript malicioso cuando el SVG es visto directamente por otros usuarios. Los scripts no se ejecutan cuando se cargan dentro de una página por medio de etiquetas "(img)" normales. El SVG malicioso sólo puede subirse al diseñar una petición personalizada al servidor con un tipo MIME falso. Un parche en la versión 2.5.264 corrige esta vulnerabilidad al añadir una comprobación adicional de la extensión del archivo al paso opcional (habilitado por defecto) de saneo de SVG a todas las subidas de archivos que coincidan con el tipo mime de SVG. Como solución, deshabilite la carga de archivos para todos los usuarios que no sean confiables

References

Sources

SourceRecordLicence
CVE ListCVE-2021-43855 changed 2024-08-04CVE Terms of Use
NVDCVE-2021-43855 changed 2026-06-17Public domain