CVE-2023-31287

7.8 HIGH

📋 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

Products:
  • Serenity Serene
  • StartSharp
Versions: All versions before 6.7.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all installations with password reset functionality enabled.

📦 What is this software?

⚠️ 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.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

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

all

Manually modify password reset logic to invalidate tokens after first use

Shorten token expiration

all

Reduce 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

📤 Share & Export