{"api_version":"1","generated_at":"2026-05-13T07:41:01+00:00","cve":"CVE-2021-43842","urls":{"html":"https://cve.report/CVE-2021-43842","api":"https://cve.report/api/cve/CVE-2021-43842.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-43842","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-43842"},"summary":{"title":"CVE-2021-43842","description":"Wiki.js is a wiki app built on Node.js. Wiki.js versions 2.5.257 and earlier are vulnerable to stored cross-site scripting through a SVG file upload. 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. Commit 5d3e81496fba1f0fbd64eeb855f30f69a9040718 fixes this vulnerability by adding an 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. Wiki.js version 2.5.260 is the first production version to contain a patch. Version 2.5.258 is the first development build to contain a patch and is available only as a Docker image as requarks/wiki:canary-2.5.258.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2021-12-20 23:15:00","updated_at":"2022-01-03 21:06:00"},"problem_types":["CWE-79"],"metrics":[],"references":[{"url":"https://github.com/Requarks/wiki/releases/tag/2.5.260","name":"https://github.com/Requarks/wiki/releases/tag/2.5.260","refsource":"MISC","tags":[],"title":"Release 2.5.260 · Requarks/wiki · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/Requarks/wiki/security/advisories/GHSA-3qv4-gp35-rgh7","name":"https://github.com/Requarks/wiki/security/advisories/GHSA-3qv4-gp35-rgh7","refsource":"CONFIRM","tags":[],"title":"Stored XSS via SVG file upload · Advisory · Requarks/wiki · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/Requarks/wiki/commit/5d3e81496fba1f0fbd64eeb855f30f69a9040718","name":"https://github.com/Requarks/wiki/commit/5d3e81496fba1f0fbd64eeb855f30f69a9040718","refsource":"MISC","tags":[],"title":"fix: sanitize SVG uploads · Requarks/wiki@5d3e814 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-43842","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43842","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2021","cve_id":"43842","vulnerable":"1","versionEndIncluding":"2.5.257","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"requarks","cpe5":"wiki.js","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2021-43842","STATE":"PUBLIC","TITLE":"Stored XSS via SVG file upload in Wiki.js"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"wiki","version":{"version_data":[{"version_value":"< 2.5.258 (development)"},{"version_value":"< 2.5.260 (production)"}]}}]},"vendor_name":"Requarks"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"Wiki.js is a wiki app built on Node.js. Wiki.js versions 2.5.257 and earlier are vulnerable to stored cross-site scripting through a SVG file upload. 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. Commit 5d3e81496fba1f0fbd64eeb855f30f69a9040718 fixes this vulnerability by adding an 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. Wiki.js version 2.5.260 is the first production version to contain a patch. Version 2.5.258 is the first development build to contain a patch and is available only as a Docker image as requarks/wiki:canary-2.5.258."}]},"impact":{"cvss":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":5.4,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"LOW","scope":"CHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')"}]}]},"references":{"reference_data":[{"name":"https://github.com/Requarks/wiki/security/advisories/GHSA-3qv4-gp35-rgh7","refsource":"CONFIRM","url":"https://github.com/Requarks/wiki/security/advisories/GHSA-3qv4-gp35-rgh7"},{"name":"https://github.com/Requarks/wiki/commit/5d3e81496fba1f0fbd64eeb855f30f69a9040718","refsource":"MISC","url":"https://github.com/Requarks/wiki/commit/5d3e81496fba1f0fbd64eeb855f30f69a9040718"},{"name":"https://github.com/Requarks/wiki/releases/tag/2.5.260","refsource":"MISC","url":"https://github.com/Requarks/wiki/releases/tag/2.5.260"}]},"source":{"advisory":"GHSA-3qv4-gp35-rgh7","discovery":"UNKNOWN"}},"nvd":{"publishedDate":"2021-12-20 23:15:00","lastModifiedDate":"2022-01-03 21:06:00","problem_types":["CWE-79"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"REQUIRED","scope":"CHANGED","confidentialityImpact":"LOW","integrityImpact":"LOW","availabilityImpact":"NONE","baseScore":5.4,"baseSeverity":"MEDIUM"},"exploitabilityScore":2.3,"impactScore":2.7},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:M/Au:S/C:N/I:P/A:N","accessVector":"NETWORK","accessComplexity":"MEDIUM","authentication":"SINGLE","confidentialityImpact":"NONE","integrityImpact":"PARTIAL","availabilityImpact":"NONE","baseScore":3.5},"severity":"LOW","exploitabilityScore":6.8,"impactScore":2.9,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":true}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:requarks:wiki.js:*:*:*:*:*:*:*:*","versionEndIncluding":"2.5.257","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2021","CveId":"43842","Ordinal":"221346","Title":"CVE-2021-43842","CVE":"CVE-2021-43842","Year":"2021"},"notes":[{"CveYear":"2021","CveId":"43842","Ordinal":"1","NoteData":"** RESERVED ** This candidate has been reserved by an organization or individual that will use it when announcing a new security problem. When the candidate has been publicized, the details for this candidate will be provided.","Type":"Description","Title":null}]}}}