Two newly disclosed vulnerabilities in Discourse let unauthenticated attackers execute JavaScript against anonymous visitors and read server files as minimally privileged users.
Published October 7, 2026, the research describes flaws affecting the forum platform’s default configuration, which powers over 22,000 communities. Both issues were reported in June and subsequently patched.
The first vulnerability, CVE-2026-55674, originated in Discourse’s handling of the color_scheme_id cookie. The application checked whether a matching color scheme existed, but Rails converted the supplied string into an integer for database lookup.
Discourse Vulnerabilities
Discourse then retained the original string and inserted it into a stylesheet link without HTML escaping, allowing attacker-controlled markup to enter the response.
Initially, this injection affected only the attacker’s response. However, Discourse’s Redis-backed anonymous cache excluded the cookie from its cache key.

A malicious response could therefore be served to subsequent anonymous visitors whose requests matched the same cache parameters, including the page path and User-Agent. Attackers could poison multiple paths and common browser identifiers to expand exposure across a site.
Discourse’s Content Security Policy blocked straightforward script injection, but its trusted boot loader offered a bypass. During initialization, it selected modulepreload links containing a data-plugin-name attribute and dynamically imported their URLs.
Injecting a matching link caused trusted application code to load an attacker-hosted JavaScript module and execute it within the forum’s origin. The remote server needed appropriate cross-origin resource sharing headers for the import to succeed.
The second vulnerability, CVE-2026-55420, involved a time-of-check-to-time-of-use race in image uploads, accessible through profile-picture functionality with a Trust Level 0 account.
Researchers combined inconsistent format detection, permissive ImageMagick configuration, GhostScript delegation, and temporary-file replacement to reach arbitrary file read/write capabilities without exploiting a GhostScript zero-day.
A JPEG XL/PostScript polyglot passed FastImage’s image checks while retaining a PDF extension. During dominant-color calculation, ImageMagick interpreted that extension through its PDF handling path, invoking GhostScript despite the policy blocking PostScript modules.
Separately, a JPEG padded with application markers slowed jpegoptim processing to approximately 25 seconds, widening the interval between validation and subsequent processing.
During this interval, atomic file replacement substituted SVG content for validated JPEG data. ImageMagick’s internal MSVG parser then invoked Magick Scripting Language, enabling the server to render file contents into an image and retrieve it through a subsequent upload.
slcyber demonstrated file disclosure; escalation to server code execution remained a potential outcome rather than a proven result.
Discourse fixed cookie validation and cache-key handling, and introduced a default-deny ImageMagick policy blocking delegates and allowlisting required coders. Hosted fixes arrived June 15; public ImageMagick and cache-poisoning fixes followed June 30 and July 28, respectively.
Join 16,000+ SOC teams using ANY.RUN to streamline threat investigations and reduce manual effort. Explore for your team