Stored XSS via unsanitized SVG uploads
Published Apr 18, 2023 · Updated Feb 6, 2025
Stored XSS in SVG uploads in Discourse stable before 3.0.3 and beta or tests-passed before 3.1.0.beta4 allows remote attackers to execute JavaScript. The SVG upload sanitizer stores attacker-controlled files without neutralizing embedded script, which executes when a user opens the uploaded image. Exploitation requires user interaction and a site that permits SVG uploads, a non-default setting; execution remains in the viewing user's browser context.
Summary
What happened
Stored XSS in SVG uploads in Discourse stable before 3.0.3 and beta or tests-passed before 3.1.0.beta4 allows remote attackers to execute JavaScript. The SVG upload sanitizer stores attacker-controlled files without neutralizing embedded script, which executes when a user opens the uploaded image. Exploitation requires user interaction and a site that permits SVG uploads, a non-default setting; execution remains in the viewing user's browser context.
The record
- CVE
- CVE-2023-30538
- Published
- Apr 18, 2023
- Updated
- Feb 6, 2025
- Vendor
- Discourse
- Product
- Discourse
- Classifications
- CWE-79, T1189
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Apr 18, 2023CVE publishedPublication date reported by the CVE source.
- Feb 6, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=beta: < 3.1.0.beta4
- Affected versionversion=stable: < 3.0.3
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo