Read the docs

Template injection in Discourse Automation lets any user become admin

Priority MEDIUM 48CWE-1336Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
High
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · GHSA-r488-76jc-8jp8. Fix status from GitHub. Impact type from CWE-1336.

Summary

Discourse from 2026.7.0-latest before 2026.7.5, from 2026.9.0-latest before 2026.9.2 and from 2026.10.0-latest before 2026.10.1 evaluates template tags in user-written text inserted by the Automation plugin's %%KEY%% placeholders (CWE-1336). A user of any trust level can craft a topic title or post that, once an automation processes it, grants admin privileges, reads server secrets or reads other users' e-mail addresses. The Automation plugin is disabled by default.

Written with Claude Haiku 5.5 from the sources below · 2026-11-12

Description from the GitHub advisory

### Impact On sites with the Automation plugin enabled, an automation that inserts user-written text using the `%%KEY%%` placeholder syntax (for example `%%TOPIC_TITLE%%`, `%%POST_QUOTE%%`, or a user's name or profile field) evaluated any template tags contained in that text on the server. A user of any trust level could craft a topic title or post that, once processed by such an automation, grants them admin privileges, reads server secrets such as the secret key base, or reads other users' data such as e-mail addresses. `%%REPORT=…%%` placeholders were affected in the same way when the report lists user-written text (for example search terms). Automation templates that only use the `{{key}}` placeholder syntax are not affected. The Automation plugin is disabled by default. Admin privileges granted this way are not recorded in the staff action logs. Administrators of affected sites should review their list of admins for unexpected accounts. ### Patches Placeholder values are now always inserted as plain text and are never evaluated as template code. Templates can now only look up placeholder values, so dotted method access such as `{{topic_title.length}}` renders as an empty string. Fixed release versions will be added after the fix and backports are released. ### Workarounds Disable the Automation plugin (`discourse_automation_enabled`), or edit automations so that templates use `{{key}}` instead of `%%KEY%%` for user-written values and do not use `%%REPORT=…%%` with reports that list user-written text. Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-0WFNSUZI.

Why it matters now

Fix Fixed Discourse: 2026.11.0-latest.1, 2026.10.1, 2026.9.2 +1

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—Discourse—2026.11.0-latest.1Patch availableGHSA-r488-76jc-8jp8
—Discourse>= 2026.10.0-latest2026.10.1Patch availableGHSA-r488-76jc-8jp8
—Discourse>= 2026.9.0-latest2026.9.2Patch availableGHSA-r488-76jc-8jp8
—Discourse>= 2026.7.0-latest2026.7.5Patch availableGHSA-r488-76jc-8jp8
  • Discourse Vendor— Affected — Fixed in 2026.11.0-latest.1 Patch available GHSA-r488-76jc-8jp8
  • Discourse Vendor— Affected >= 2026.10.0-latest Fixed in 2026.10.1 Patch available GHSA-r488-76jc-8jp8
  • Discourse Vendor— Affected >= 2026.9.0-latest Fixed in 2026.9.2 Patch available GHSA-r488-76jc-8jp8
  • Discourse Vendor— Affected >= 2026.7.0-latest Fixed in 2026.7.5 Patch available GHSA-r488-76jc-8jp8

Remediation

Upgrade Discourse to 2026.7.5, 2026.9.2, 2026.10.1 or 2026.11.0-latest.1, depending on the release line. As a workaround, disable the Automation plugin with discourse_automation_enabled, or change automation templates to use {{key}} instead of %%KEY%% for user-written values and avoid %%REPORT=…%% with reports that list user-written text.

Written with Claude Haiku 5.5 from the sources below · 2026-11-12

  • Fix · GHSA-r488-76jc-8jp8 Discourse Fixed in 2026.11.0-latest.1 Advisory →
  • Fix · GHSA-r488-76jc-8jp8 Discourse Fixed in 2026.10.1 Advisory →
  • Fix · GHSA-r488-76jc-8jp8 Discourse Fixed in 2026.9.2 Advisory →
  • Fix · GHSA-r488-76jc-8jp8 Discourse Fixed in 2026.7.5 Advisory →

Timeline

  1. 2026-11-12 Threatist record created from GHSA-r488-76jc-8jp8

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences