What’s Vulnerable › Vulnerabilities
CVE-2022-31025: Invite bypasses user approval in Discourse
- Severity: medium (CVSS 5.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.0% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-06-07 · updated 2026-06-17
- Weakness: CWE-285
Description
Discourse is an open source platform for community discussion. Prior to version 2.8.4 on the `stable` branch and 2.9.0beta5 on the `beta` and `tests-passed` branches, inviting users on sites that use single sign-on could bypass the `must_approve_users` check and invites by staff are always approved automatically. The issue is patched in Discourse version 2.8.4 on the `stable` branch and version `2.9.0.beta5` on the `beta` and `tests-passed` branches. As a workaround, disable invites or increase `min_trust_level_to_allow_invite` to reduce the attack surface to more trusted users.
Affected products
- discourse: before 2.8.4; 2.9.0-beta1, 2.9.0-beta2, 2.9.0-beta3, 2.9.0-beta4 — fixed in 2.8.4
How to fix
Upgrade to a fixed version: discourse 2.8.4. Check the vendor advisory for mitigations.
References
- https://github.com/discourse/discourse/commit/0fa0094531efc82d9371f90a02aa804b176d59cf
- https://github.com/discourse/discourse/commit/7c4e2d33fa4b922354c177ffc880a2f2701a91f9
- https://github.com/discourse/discourse/pull/16974
- https://github.com/discourse/discourse/pull/16984
- https://github.com/discourse/discourse/security/advisories/GHSA-x7jh-mx5q-6f9q
- https://github.com/discourse/discourse/commit/0fa0094531efc82d9371f90a02aa804b176d59cf
- https://github.com/discourse/discourse/commit/7c4e2d33fa4b922354c177ffc880a2f2701a91f9
- https://github.com/discourse/discourse/pull/16974
- https://github.com/discourse/discourse/pull/16984
- https://github.com/discourse/discourse/security/advisories/GHSA-x7jh-mx5q-6f9q
Get alerted when CVE-2022-31025 or the next vulnerability affects your stack