Security Vulnerability Report
中文
CVE-2026-33393 CVSS 4.3 MEDIUM

CVE-2026-33393

Published: 2026-03-19 22:16:42
Last Modified: 2026-03-24 20:41:57

Description

Discourse is an open-source discussion platform. Prior to versions 2026.3.0-latest.1, 2026.2.1, and 2026.1.2, the `allowed_spam_host_domains` check used `String#end_with?` without domain boundary validation, allowing domains like `attacker-example.com` to bypass spam protection when `example.com` was allowlisted. Versions 2026.3.0-latest.1, 2026.2.1, and 2026.1.2 require exact match or proper subdomain match (preceded by `.`) to prevent suffix-based bypass of `newuser_spam_host_threshold`. No known workarounds are available.

CVSS Details

CVSS Score
4.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:discourse:discourse:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:discourse:discourse:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:discourse:discourse:2026.3.0:*:*:*:latest:*:*:* - VULNERABLE
Discourse < 2026.3.0-latest.1
Discourse < 2026.2.1
Discourse < 2026.1.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# Vulnerable Logic Simulation (Ruby) # Before fix: simple suffix check ALLOWED_DOMAINS = ["example.com"] def check_vulnerable(domain) ALLOWED_DOMAINS.any? { |d| domain.end_with?(d) } end # Attacker uses 'attacker-example.com' puts check_vulnerable("attacker-example.com") # Returns: true (Bypass!) # Fixed Logic Simulation # After fix: exact match or subdomain match def check_fixed(domain) ALLOWED_DOMAINS.any? do |d| domain == d || domain.end_with?("." + d) end end puts check_fixed("attacker-example.com") # Returns: false

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33393", "sourceIdentifier": "[email protected]", "published": "2026-03-19T22:16:42.497", "lastModified": "2026-03-24T20:41:57.427", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Discourse is an open-source discussion platform. Prior to versions 2026.3.0-latest.1, 2026.2.1, and 2026.1.2, the `allowed_spam_host_domains` check used `String#end_with?` without domain boundary validation, allowing domains like `attacker-example.com` to bypass spam protection when `example.com` was allowlisted. Versions 2026.3.0-latest.1, 2026.2.1, and 2026.1.2 require exact match or proper subdomain match (preceded by `.`) to prevent suffix-based bypass of `newuser_spam_host_threshold`. No known workarounds are available."}, {"lang": "es", "value": "Discourse es una plataforma de discusión de código abierto. Antes de las versiones 2026.3.0-latest.1, 2026.2.1 y 2026.1.2, la verificación 'allowed_spam_host_domains' utilizaba 'String#end_with?' sin validación de límites de dominio, lo que permitía que dominios como 'attacker-example.com' eludieran la protección contra el correo no deseado cuando 'example.com' estaba en lista blanca. Las versiones 2026.3.0-latest.1, 2026.2.1 y 2026.1.2 requieren una coincidencia exacta o una coincidencia de subdominio adecuada (precedida por '.') para evitar la elusión basada en sufijos de 'newuser_spam_host_threshold'. No hay soluciones alternativas conocidas disponibles."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N", "baseScore": 4.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-284"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:discourse:discourse:*:*:*:*:*:*:*:*", "versionStartIncluding": "2026.1.0", "versionEndExcluding": "2026.1.2", "matchCriteriaId": "4BE96625-3609-410C-B41E-4A824C1A57C0"}, {"vulnerable": true, "criteria": "cpe:2.3:a:discourse:discourse:*:*:*:*:*:*:*:*", "versionStartIncluding": "2026.2.0", "versionEndExcluding": "2026.2.1", "matchCriteriaId": "FD31CF04-CF2F-4FB9-8880-9243BC7671A7"}, {"vulnerable": true, "criteria": "cpe:2.3:a:discourse:discourse:2026.3.0:*:*:*:latest:*:*:*", "matchCriteriaId": "E3FE9277-4F6B-4FD0-991F-F0FB8D226E1C"}]}]}], "references": [{"url": "https://github.com/discourse/discourse/commit/80b19c15fe9c7bc890d1a54f454c8446312ac6d2", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/discourse/discourse/commit/d8467b9fbb3d9ed6047b4e508d3fef88a37b8a02", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/discourse/discourse/commit/f99099cfbc6b76fe39d6fa2daa48efd69497fb8e", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/discourse/discourse/security/advisories/GHSA-95r5-p6qr-hgw6", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}