{"id":"CVE-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":["BIT-discourse-2023-30538","GHSA-w5mv-4pjf-xj43"],"modified":"2026-09-29T11:46:01.670327553Z","published":"2023-04-18T21:25:58.848Z","database_specific":{"cwe_ids":["CWE-79"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/30xxx/CVE-2023-30538.json","cna_assigner":"GitHub_M"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/30xxx/CVE-2023-30538.json"},{"type":"ADVISORY","url":"https://github.com/discourse/discourse/security/advisories/GHSA-w5mv-4pjf-xj43"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-30538"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/discourse/discourse","events":[{"introduced":"59dd20c4153cef96ff0e848a087af4464a4bdcce"},{"last_affected":"ca827529764ca415727fc1925775804708a990da"}],"database_specific":{"source":"AFFECTED_FIELD","extracted_events":[{"introduced":"stable: \u003c 3.0.3"},{"last_affected":"stable: \u003c 3.0.3"},{"introduced":"beta: \u003c 3.1.0.beta4"},{"last_affected":"beta: \u003c 3.1.0.beta4"}]}}],"versions":["beta: \u003c 3.1.0.beta4","stable: \u003c 3.0.3"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-30538.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"}]}