What’s Vulnerable › Vulnerabilities
CVE-2022-23549: Discourse vulnerable to bypass of post max_length using HTML comments
- Severity: medium (CVSS 6.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.6% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2023-01-05 · updated 2026-06-17
- Weakness: CWE-20
Description
Discourse is an option source discussion platform. Prior to version 2.8.14 on the `stable` branch and version 2.9.0.beta16 on the `beta` and `tests-passed` branches, users can create posts with raw body longer than the `max_length` site setting by including html comments that are not counted toward the character limit. This issue is patched in versions 2.8.14 and 2.9.0.beta16. There are no known workarounds.
Affected products
- discourse: before 2.8.14; 2.9.0-beta1, 2.9.0-beta10, 2.9.0-beta11, 2.9.0-beta12, 2.9.0-beta13, 2.9.0-beta14 (+8) — fixed in 2.8.14
How to fix
Upgrade to a fixed version: discourse 2.8.14. Check the vendor advisory for mitigations.
References
- https://github.com/discourse/discourse/commit/bf6b08670a927cc80bb090b7a2e710b4b554e6a8
- https://github.com/discourse/discourse/security/advisories/GHSA-p47g-v5wr-p4xp
- https://github.com/discourse/discourse/commit/bf6b08670a927cc80bb090b7a2e710b4b554e6a8
- https://github.com/discourse/discourse/security/advisories/GHSA-p47g-v5wr-p4xp
Get alerted when CVE-2022-23549 or the next vulnerability affects your stack