CVE-2023-31287 — Insufficient token expiration in Serenity.Net.Core
Insufficient token expiration in Serenity
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.31%). Schedule for your next planned update.
Does your project use an affected Serenity.Net.Core version?
Paste your packages.lock.json to check it for CVE-2023-31287 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
An issue was discovered in Serenity Serene (and StartSharp) before 6.7.0. Password reset links are sent by email. A link contains a token that is used to reset the password. This token remains valid even after the password reset and can be used a second time to change the password of the corresponding user. The token expires only 3 hours after issuance and is sent as a query parameter when resetting. An attacker with access to the browser history can thus use the token again to change the password in order to take over the account.
Advisory Timeline
- First published April 27, 2023 (1309 days ago).
- Last revised January 31, 2025 — 646 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
dotnet add package Serenity.Net.Core --version 6.7.0
dotnet add package Serenity.Net.Web --version 6.7.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: NuGet (2).
| Package | Fixed In |
|---|---|
| Serenity.Net.Core NuGet · Affected: 5.0.0, 5.0.1, 5.0.10, 5.0.11 (+112 more) | 6.7.0 |
| Serenity.Net.Web NuGet · Affected: 5.0.0, 5.0.1, 5.0.10, 5.0.11 (+112 more) | 6.7.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-640
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.8 score means for each attack dimension.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://nvd.nist.gov/vuln/detail/CVE-2023-31287ADVISORY
- https://github.com/serenity-is/Serenity/commit/11b9d267f840513d04b4f4d4876de7823a6e48d2WEB
- https://github.com/serenity-is/SerenityPACKAGE
- https://packetstorm.news/files/id/172648WEB
- https://packetstormsecurity.com/files/172648/Serenity-StartSharp-Software-File-Upload-XSS-User-Enumeration-Reusable-Tokens.htmlWEB
- https://seclists.org/fulldisclosure/2023/May/14WEB
Frequently Asked Questions
- What is CVE-2023-31287?
- Insufficient token expiration in Serenity. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.8/10).
- How do I check if my project is affected by CVE-2023-31287?
- CVE-2023-31287 affects Serenity.Net.Core and Serenity.Net.Web. It has a 0.3% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2023-31287 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 16.8% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-102529HIGH
HtmlSanitizer: CSS Removal DoS
- CVE-2026-63184HIGH
Refitter: Unrestricted OpenAPI references permit build-host SSRF and file inclusion