CVE-2023-31285 is a medium-severity (CVSS 6.1) Cross-site Scripting (XSS) vulnerability in Serenity.Net.Core. A fix is available for Serenity.Net.Core — see the affected versions and patch details below.
Cross Site Scripting (XSS) in Serenity
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2023-31285.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
Serenity.Net.Core.NETSerenity.Net.ServicesReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects NuGet packages — download data is not available via public APIs for these ecosystems.
Description
An XSS issue was discovered in Serenity Serene (and StartSharp) before 6.7.0. When users upload temporary files, some specific file endings are not allowed, but it is possible to upload .html or .htm files containing an XSS payload. The resulting link can be sent to an administrator user.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| .NETNuGet | Serenity.Net.Core | all versions | 6.7.0dotnet add package Serenity.Net.Core --version 6.7.0 |
| .NETNuGet | Serenity.Net.Services | all versions | 6.7.0dotnet add package Serenity.Net.Services --version 6.7.0 |
Affected Products
sereneserenitystartsharpserenityDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for Serenity.Net.Core, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update Serenity.Net.Core to 6.7.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2023-31285 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is CVE-2023-31285 in your dependencies?
Find it across NuGet, including transitive dependencies.