CVE-2023-31287 Insufficient token expiration in Serenity

High 7.8 Published Updated

Attackers can reuse password reset tokens to take over user accounts if they access browser history, affecting Serenity Serene users.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2023-31287?

CVE-2023-31287 is a high-severity vulnerability in n/a, published on 27 Apr 2023. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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.

Weakness: CWE-640

Which versions are affected by CVE-2023-31287?

4 open source packages ship an affected version, including Serenity.Net.Core and Serenity.Net.Web. It affects 2 products.

PackageAffectedFixed in
Serenity.Net.Core NuGetAll versions6.7.0
Serenity.Net.Core NuGetAll versions6.7.0
Serenity.Net.Web NuGetAll versions6.7.0
Serenity.Net.Web NuGetAll versions6.7.0

Products include Serenity Serene, Serenity Startsharp.

How do I fix CVE-2023-31287?

Upgrade Serenity.Net.Core to 6.7.0 or later.

Is CVE-2023-31287 being exploited?

There is no known exploitation of CVE-2023-31287 in the wild and no public exploit code.

Sources

Also known as GHSA-2hp9-3xfr-r9w2.

Is CVE-2023-31287 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free