Skip to main content

Discourse CVE-2026-55420

| EUVDEUVD-2026-42665 HIGH
OS Command Injection (CWE-78)
2026-07-09 security-advisories@github.com
8.1
CVSS 3.1 · NVD
Share

Severity by source

Vendor (github) PRIMARY
HIGH
qualitative
NVD
8.1 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI
7.5 HIGH

Network-delivered upload (AV:N) but requires the non-default discourse-ai PDF/vision config (AC:H) and normally a logged-in uploader (PR:L); delegate RCE yields full host impact (C/I/A:H).

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

7
Analysis Updated
Jul 13, 2026 - 14:45 vuln.today
v3 (cvss_changed)
Source Code Evidence Fetched
Jul 13, 2026 - 14:45 vuln.today
Analysis Updated
Jul 13, 2026 - 14:45 vuln.today
v2 (cvss_changed)
Re-analysis Queued
Jul 13, 2026 - 14:37 vuln.today
cvss_changed
CVSS changed
Jul 13, 2026 - 14:37 NVD
7.5 (HIGH) 8.1 (HIGH)
Patch available
Jul 09, 2026 - 19:01 EUVD
Analysis Generated
Jul 09, 2026 - 18:31 vuln.today

DescriptionNVD

Discourse is an open-source discussion platform. Prior to 2026.6.0, 2026.5.1, 2026.4.2, and 2026.1.5, under certain non-default configurations, processing of PDF uploads could be exploited to obtain RCE on the server. This issue is patched in 2026.6.0, 2026.5.1, 2026.4.2, and 2026.1.5.

AnalysisAI

Remote code execution in Discourse (via the discourse-ai plugin's PDF-to-text feature) allows an attacker who can upload a crafted PDF to run arbitrary commands on the server, but only in non-default configurations where an LLM vision model is configured. The flaw is a CWE-78 OS command injection reached when uploaded PDFs are rasterized through ImageMagick, which in turn invokes an external delegate (Ghostscript) on attacker-controlled input. It is not in CISA KEV and has no public exploit identified at time of analysis; EPSS is low at 0.33% (25th percentile), and vendor patches exist across all supported release lines.

Technical ContextAI

The vulnerable code lives in plugins/discourse-ai/lib/utils/pdf_to_text.rb, which - when an LLM model is configured (@llm_model set) - shells out to ImageMagick's magick binary with -density 300 on the uploaded PDF path to convert each page to a PNG before OCR/vision extraction. ImageMagick historically dispatches PDF/PostScript handling to an external delegate program (Ghostscript), and crafted PDF/PostScript content can smuggle shell commands through that delegate pipeline, yielding OS command injection (CWE-78), the ImageMagick/Ghostscript 'delegate' RCE class. The CPE data scopes this to cpe:2.3:a:discourse:discourse across multiple release trains, fixed at 2026.6.0. The fix removes the ImageMagick PDF-rasterization path entirely (falling back to plain PDF::Reader text extraction), forces all ImageMagick invocations through a locked-down policy.xml (loaded via MAGICK_CONFIGURE_PATH, enforced by an initializer that refuses to boot if the variable is overridden), disables all external delegates and filters, blocks path/@-indirection tricks, and denies every coder except an explicit allowlist of raster/SVG-dimension formats.

RemediationAI

Vendor-released patch: upgrade to 2026.6.0, 2026.5.1, 2026.4.2, or 2026.1.5 (whichever matches your release train), per advisory GHSA-7wq5-jgww-5rw3 and the release tags at https://github.com/discourse/discourse/releases; the underlying change is commit ca5a7e06167561928556afa2f237d67e459c6914. If you cannot patch immediately, the most direct compensating control is to disable the discourse-ai PDF-to-text/vision pathway (unset the configured LLM vision model / disable AI PDF processing), which removes the ImageMagick PDF-rasterization call at the cost of losing AI OCR of PDFs. As an environment-level control you can replicate the fix's hardened ImageMagick policy (config/imagemagick/policy.xml) to deny all external delegates (Ghostscript) and restrict coders to the needed formats, and set MAGICK_CONFIGURE_PATH to point at it; the trade-off is that any legitimate feature relying on a now-denied coder or delegate will break, so test image/HEIC/SVG-dimension handling after applying it. Restricting who may upload PDFs (e.g. trust-level gating, disabling anonymous uploads) reduces but does not eliminate exposure.

CVE-2025-48954 HIGH POC
8.1 Jun 25

Discourse versions prior to 3.5.0.beta6 contain a reflected cross-site scripting (XSS) vulnerability in social login fun

CVE-2024-47773 HIGH POC
8.2 Oct 08

Discourse is an open source platform for community discussion. Rated high severity (CVSS 8.2), this vulnerability is rem

CVE-2021-3138 HIGH POC
7.5 Jan 14

In Discourse 2.7.0 through beta1, a rate-limit bypass leads to a bypass of the 2FA requirement for certain forms. Rated

CVE-2023-38706 MEDIUM POC
6.5 Sep 15

Discourse is an open-source discussion platform. Rated medium severity (CVSS 6.5), this vulnerability is remotely exploi

CVE-2024-53991 MEDIUM POC
5.9 Dec 19

Discourse is an open source platform for community discussion. Rated medium severity (CVSS 5.9), this vulnerability is r

CVE-2025-48877 CRITICAL
9.8 Jun 09

Discourse versions prior to 3.4.4 (stable), 3.5.0.beta5 (beta), and 3.5.0.beta6-dev (tests-passed) contain a critical vu

CVE-2023-47121 CRITICAL
9.8 Nov 10

Discourse is an open source platform for community discussion. Rated critical severity (CVSS 9.8), this vulnerability is

CVE-2021-41163 CRITICAL
9.8 Oct 20

Discourse is an open source platform for community discussion. Rated critical severity (CVSS 9.8), this vulnerability is

CVE-2024-49765 CRITICAL
9.1 Dec 19

Discourse is an open source platform for community discussion. Rated critical severity (CVSS 9.1), this vulnerability is

CVE-2026-53963 CRITICAL
9.0 Jul 09

Stored cross-site scripting in the Discourse discussion platform allows a low-privileged registered user to set a malici

CVE-2022-39356 HIGH
8.8 Nov 02

Discourse is a platform for community discussion. Rated high severity (CVSS 8.8), this vulnerability is remotely exploit

CVE-2026-27934 HIGH
8.7 Mar 19

Unauthorized information disclosure in Discourse discussion platform versions prior to 2026.3.0-latest.1, 2026.2.1, and

Share

CVE-2026-55420 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy