{"id":"BIT-discourse-2023-30538","summary":"Stored Cross-site Scripting via improper sanitization of svg files in Discourse","details":"Discourse is an open source platform for community discussion. Due to the improper sanitization of SVG files, an attacker can execute arbitrary JavaScript on the users’ browsers by uploading a crafted SVG file. This issue is patched in the latest stable and tests-passed versions of Discourse. Users are advised to upgrade. For users unable to upgrade there are two possible workarounds: enable CDN handing of uploads (and ensure the CDN sanitizes SVG files) or disable SVG file uploads by ensuring that the `authorized extensions` site setting does not include `svg` (or reset that setting to the default, by default Discourse doesn't enable SVG uploads by users).","aliases":["CVE-2023-30538","GHSA-w5mv-4pjf-xj43"],"modified":"2025-10-08T14:27:11.581155Z","published":"2024-03-06T10:57:47.289Z","database_specific":{"cpes":["cpe:2.3:a:discourse:discourse:*:*:*:*:stable:*:*:*","cpe:2.3:a:discourse:discourse:*:*:*:*:*:*:*:*","cpe:2.3:a:discourse:discourse:*:*:*:*:beta:*:*:*","cpe:2.3:a:discourse:discourse:3.1.0:beta1:*:*:beta:*:*:*","cpe:2.3:a:discourse:discourse:3.1.0:beta2:*:*:beta:*:*:*","cpe:2.3:a:discourse:discourse:3.1.0:beta3:*:*:beta:*:*:*"],"severity":"Medium"},"references":[{"type":"WEB","url":"https://github.com/discourse/discourse/security/advisories/GHSA-w5mv-4pjf-xj43"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-30538"}],"affected":[{"package":{"name":"discourse","ecosystem":"Bitnami","purl":"pkg:bitnami/discourse"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.1.0"}]},{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"3.0.2"}]}],"database_specific":{"source":"https://github.com/bitnami/vulndb/tree/main/data/discourse/BIT-discourse-2023-30538.json"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"}]}],"schema_version":"1.7.3"}