{"id":"CVE-2023-25172","summary":"Discourse vulnerable to Cross-site Scripting - user name displayed on post","details":"Discourse is an open-source discussion platform. Prior to version 3.0.1 of the `stable` branch and version 3.1.0.beta2 of the `beta` and `tests-passed` branches, a maliciously crafted URL can be included in a user's full name field to to carry out cross-site scripting attacks on sites with a disabled or overly permissive CSP (Content Security Policy). Discourse's default CSP prevents this vulnerability. The vulnerability is patched in version 3.0.1 of the `stable` branch and version 3.1.0.beta2 of the `beta` and `tests-passed` branches. As a workaround, enable and/or restore your site's CSP to the default one provided with Discourse.","aliases":["BIT-discourse-2023-25172","GHSA-7pm2-prxw-wrvp"],"modified":"2026-10-28T02:30:42.498122782Z","published":"2023-03-17T16:07:27.668Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-79"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/25xxx/CVE-2023-25172.json"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/25xxx/CVE-2023-25172.json"},{"type":"ADVISORY","url":"https://github.com/discourse/discourse/security/advisories/GHSA-7pm2-prxw-wrvp"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-25172"},{"type":"FIX","url":"https://github.com/discourse/discourse/commit/1a5a6f66cb821ed29a737311d6fdc2eba5adc915"},{"type":"FIX","url":"https://github.com/discourse/discourse/commit/c186a46910431020e8efc425dec2133e7a99fa9a"},{"type":"FIX","url":"https://github.com/discourse/discourse/pull/20008"},{"type":"FIX","url":"https://github.com/discourse/discourse/pull/20009"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/discourse/discourse","events":[{"introduced":"4571b10ee5a3c46249271b2870d6eaf37994460f"},{"fixed":"1a5a6f66cb821ed29a737311d6fdc2eba5adc915"},{"fixed":"c186a46910431020e8efc425dec2133e7a99fa9a"}],"database_specific":{"extracted_events":[{"source":"AFFECTED_FIELD","strategy":"StandaloneSingleVersion","range":[{"introduced":"stable \u003c 3.0.1"},{"last_affected":"stable \u003c 3.0.1"}]},{"strategy":"StandaloneSingleVersion","range":[{"introduced":"beta \u003c 3.1.0.beta2"},{"last_affected":"beta \u003c 3.1.0.beta2"}],"source":"AFFECTED_FIELD"},{"source":"AFFECTED_FIELD","strategy":"StandaloneSingleVersion","range":[{"introduced":"tests-passed \u003c 3.1.0.beta2"},{"last_affected":"tests-passed \u003c 3.1.0.beta2"}]},{"range":[{"fixed":"1a5a6f66cb821ed29a737311d6fdc2eba5adc915"}],"source":"REFERENCES_COMMIT"},{"range":[{"fixed":"c186a46910431020e8efc425dec2133e7a99fa9a"}],"source":"REFERENCES_COMMIT"}]}}],"versions":["3.1.0-beta1","beta \u003c 3.1.0.beta2","stable \u003c 3.0.1"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-25172.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N"}]}