VYPR
Moderate severityNVD Advisory· Published Feb 4, 2022· Updated Apr 22, 2025

XSS by SVG upload in xwiki-platform

CVE-2021-43841

Description

XWiki is a generic wiki platform offering runtime services for applications built on top of it. When using default XWiki configuration, it's possible for an attacker to upload an SVG containing a script executed when executing the download action on the file. This problem has been patched so that the default configuration doesn't allow to display the SVG files in the browser. Users are advised to update or to disallow uploads of SVG files.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
org.xwiki.platform:xwiki-platform-oldcoreMaven
< 12.10.612.10.6
org.xwiki.platform:xwiki-platform-oldcoreMaven
>= 13.0, < 13.3RC113.3RC1
org.xwiki.platform:xwiki-platform-tool-configuration-resourcesMaven
>= 13.0, < 13.3RC113.3RC1
org.xwiki.platform:xwiki-platform-tool-configuration-resourcesMaven
< 12.10.612.10.6

Affected products

1

Patches

1
5853d492b3a2

XWIKI-18368: Modernize download types configuration

https://github.com/xwiki/xwiki-platformSimon UrliMar 30, 2021via ghsa
2 files changed · +2 2
  • xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/DownloadAction.java+1 1 modified
    @@ -74,7 +74,7 @@ public class DownloadAction extends XWikiAction
         public static final List<String> MIMETYPE_WHITELIST =
             Arrays.asList("audio/basic", "audio/L24", "audio/mp4", "audio/mpeg", "audio/ogg", "audio/vorbis",
                 "audio/vnd.rn-realaudio", "audio/vnd.wave", "audio/webm", "image/gif", "image/jpeg", "image/pjpeg",
    -            "image/png", "image/svg+xml", "image/tiff", "text/csv", "text/plain", "text/xml", "text/rtf", "video/mpeg",
    +            "image/png", "image/tiff", "text/csv", "text/plain", "text/xml", "text/rtf", "video/mpeg",
                 "video/ogg", "video/quicktime", "video/webm", "video/x-matroska", "video/x-ms-wmv", "video/x-flv");
     
         /** Key of the whitelist in xwiki.properties. */
    
  • xwiki-platform-tools/xwiki-platform-tool-configuration-resources/src/main/resources/xwiki.properties.vm+1 1 modified
    @@ -749,7 +749,7 @@ extension.versioncheck.environment.enabled=$xwikiPropertiesEnvironmentVersionChe
     #-# If you want to force downloading some attachments types please check the configuration below.
     #-#
     #-# By default we use the following whitelist (coma separated list of values).
    -# attachment.download.whitelist=audio/basic,audio/L24,audio/mp4,audio/mpeg,audio/ogg,audio/vorbis,audio/vnd.rn-realaudio,audio/vnd.wave,audio/webm,image/gif,image/jpeg,image/pjpeg,image/png,image/svg+xml,image/tiff,text/csv,text/plain,text/xml,text/rtf,video/mpeg,video/ogg,video/quicktime,video/webm,video/x-matroska,video/x-ms-wmv,video/x-flv
    +# attachment.download.whitelist=audio/basic,audio/L24,audio/mp4,audio/mpeg,audio/ogg,audio/vorbis,audio/vnd.rn-realaudio,audio/vnd.wave,audio/webm,image/gif,image/jpeg,image/pjpeg,image/png,image/tiff,text/csv,text/plain,text/xml,text/rtf,video/mpeg,video/ogg,video/quicktime,video/webm,video/x-matroska,video/x-ms-wmv,video/x-flv
     #-#
     #-# If you prefer to use a blacklist instead, you can define the forbidden types here, as a coma separated list of
     #-# values. We advise you to forbid at least the following mimetypes : text/html, text/javascript
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

6

News mentions

0

No linked articles in our index yet.