ReDoS in Discourse Markdown image size parsing
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · GHSA-gx6q-cmhc-xmrw. Fix status from GitHub.
Summary
Discourse versions from 2026.7.0-latest, 2026.9.0-latest and 2026.10.0-latest onward are affected until their fixed releases. The regular expression that parses image size suffixes in the Markdown parser uses ambiguous quantifiers, which cause catastrophic backtracking. Any registered user with Trust Level 0 or higher can submit a post with a crafted Markdown image tag that has long invalid numeric dimensions. Server CPU use spikes, and one request can block other Markdown rendering on the worker, degrading post creation, edits and chat.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Description from the GitHub advisory
### Impact A Regular Expression Denial of Service (ReDoS) vulnerability existed in the Markdown parser used by Discourse. Specifically, the regular expression responsible for parsing image size suffixes in Markdown syntax contained ambiguous quantifiers that resulted in catastrophic backtracking when processing certain malformed numeric inputs. An attacker with a Trust Level of 0 or higher (any registered user who can create posts or reply) could exploit this by submitting a post containing a specifically crafted Markdown image tag with long, invalid numeric dimensions. This caused the server-side Markdown rendering process ("cooking") to consume excessive CPU resources for an extended period. Due to internal locking mechanisms during the cooking process, a single malicious request could block all other Markdown rendering operations on the worker, leading to significant performance degradation or temporary site-wide availability issues affecting post creation, edits, and chat messages. There is no impact on data confidentiality or integrity; the malicious input is treated as literal text. ### Workarounds Site administrators can mitigate this issue by deploying a Web Application Firewall (WAF) rule that inspects incoming post bodies for Markdown image syntax (`![...`) containing excessively long sequences of digits in the size suffix attribute (e.g., `![alt|...x...]`). Blocking requests where the size attribute contains more than a few hundred consecutive characters before processing can prevent the regex backtracking. Additionally, strictly enforcing rate limits on post creation may reduce the effectiveness of concurrent attempts to exhaust server resources. <!-- patch-triage-lifecycle:900bb76fa6b1ad21adcd3e9cc3738ea7b2597830fcfd29a3ae06111a2c2284ae --> Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-FT274P2I.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | Discourse | — | 2026.11.0-latest.1 | Patch available | GHSA-gx6q-cmhc-xmrw |
| — | Discourse | >= 2026.10.0-latest | 2026.10.1 | Patch available | GHSA-gx6q-cmhc-xmrw |
| — | Discourse | >= 2026.9.0-latest | 2026.9.2 | Patch available | GHSA-gx6q-cmhc-xmrw |
| — | Discourse | >= 2026.7.0-latest | 2026.7.5 | Patch available | GHSA-gx6q-cmhc-xmrw |
- Discourse Vendor— Affected — Fixed in 2026.11.0-latest.1 Patch available GHSA-gx6q-cmhc-xmrw
- Discourse Vendor— Affected >= 2026.10.0-latest Fixed in 2026.10.1 Patch available GHSA-gx6q-cmhc-xmrw
- Discourse Vendor— Affected >= 2026.9.0-latest Fixed in 2026.9.2 Patch available GHSA-gx6q-cmhc-xmrw
- Discourse Vendor— Affected >= 2026.7.0-latest Fixed in 2026.7.5 Patch available GHSA-gx6q-cmhc-xmrw
Remediation
Upgrade Discourse to 2026.7.5, 2026.9.2, 2026.10.1, or 2026.11.0-latest.1, depending on the release line in use. Site administrators can deploy a web application firewall rule that blocks post bodies with image size attributes containing very long runs of digits before they are processed, and can enforce rate limits on post creation.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
- Fix · GHSA-gx6q-cmhc-xmrw Discourse Fixed in 2026.11.0-latest.1 Advisory →
- Fix · GHSA-gx6q-cmhc-xmrw Discourse Fixed in 2026.10.1 Advisory →
- Fix · GHSA-gx6q-cmhc-xmrw Discourse Fixed in 2026.9.2 Advisory →
- Fix · GHSA-gx6q-cmhc-xmrw Discourse Fixed in 2026.7.5 Advisory →
Timeline
- 2026-11-12 Threatist record created from GHSA-gx6q-cmhc-xmrw
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences