CVE-2023-31287
📋 TL;DR
This vulnerability allows password reset tokens in Serenity/StartSharp to be reused after initial password reset, remaining valid for 3 hours. Attackers with access to browser history or token exposure can hijack accounts by reusing tokens. Affects all users of Serenity Serene and StartSharp before version 6.7.0.
💻 Affected Systems
- Serenity Serene
- StartSharp
📦 What is this software?
Serene by Serenity
Startsharp by Serenity
⚠️ Risk & Real-World Impact
Worst Case
Complete account takeover leading to unauthorized access, data theft, privilege escalation, and potential lateral movement within the system.
Likely Case
Targeted account compromise where attackers gain access to user accounts through token reuse, potentially leading to data exposure and unauthorized actions.
If Mitigated
Limited impact with proper token invalidation and monitoring, though some risk remains from exposed tokens.
🎯 Exploit Status
Exploitation requires access to password reset tokens, which can be obtained from browser history, logs, or network interception.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 6.7.0
Vendor Advisory: https://github.com/serenity-is/Serenity/commit/11b9d267f840513d04b4f4d4876de7823a6e48d2
Restart Required: Yes
Instructions:
1. Update Serenity/StartSharp to version 6.7.0 or later. 2. Restart the application server. 3. Verify token invalidation after password reset.
🔧 Temporary Workarounds
Implement token invalidation
allManually modify password reset logic to invalidate tokens after first use
Shorten token expiration
allReduce token validity period from 3 hours to minutes
🧯 If You Can't Patch
- Disable password reset functionality temporarily
- Implement additional authentication factors for password changes
🔍 How to Verify
Check if Vulnerable:
Check application version and test if password reset tokens remain valid after password change
Check Version:
Check application configuration or package manager for Serenity/StartSharp version
Verify Fix Applied:
Test password reset flow to confirm tokens are invalidated after first use
📡 Detection & Monitoring
Log Indicators:
- Multiple password reset attempts for same user within short timeframe
- Password reset token reuse events
Network Indicators:
- Multiple password reset requests from same IP
- Unusual password reset patterns
SIEM Query:
source="application_logs" AND (event="password_reset" AND count>1) BY user WITHIN 3h
🔗 References
- http://packetstormsecurity.com/files/172648/Serenity-StartSharp-Software-File-Upload-XSS-User-Enumeration-Reusable-Tokens.html
- http://seclists.org/fulldisclosure/2023/May/14
- https://github.com/serenity-is/Serenity/commit/11b9d267f840513d04b4f4d4876de7823a6e48d2
- http://packetstormsecurity.com/files/172648/Serenity-StartSharp-Software-File-Upload-XSS-User-Enumeration-Reusable-Tokens.html
- http://seclists.org/fulldisclosure/2023/May/14
- https://github.com/serenity-is/Serenity/commit/11b9d267f840513d04b4f4d4876de7823a6e48d2
- https://packetstorm.news/files/id/172648