---
id: "CVE-2017-20290"
kind: "vulnerability"
aliases: ["CVE-2017-20290"]
title: "Discourse: unsubscribe page reflects email parameter, runs script in browsers"
severity: "medium"
cvss: 6.1
epss: 0.00265
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["discourse", "ruby-on-rails", "runtime", "self-hosted"]
not_affected_if: ["default-config", "managed-hosting"]
published_at: "2026-10-22T11:17:03+00:00"
first_seen_at: "2026-10-23T21:57:30+00:00"
updated_at: "2026-10-25T04:03:23+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2017-20290", "first_seen_at": "2026-10-23T21:57:30+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2017-20290", "first_seen_at": "2026-10-24T07:15:51+00:00"}]
---

# Discourse: unsubscribe page reflects email parameter, runs script in browsers

Discourse versions from 1.9.0.beta2 before 1.9.0.beta13 render the email parameter of the /email/unsubscribed page without escaping. An unauthenticated attacker can send a victim a crafted GET link with an SVG onload payload to run JavaScript in the victim's browser.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed Discourse version in the admin dashboard or the `version` file in the Discourse install directory
- Look for `/email/unsubscribed` requests with `email=` values containing `<svg` or `onload` in web server access logs

## Fix

- Upgrade Discourse to `1.9.0.beta13` or later, which the advisory names as the fixed release
- Note: the sources do not give a specific current stable version to move to

## Timeline

- 2026-10-23T21:57:30+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2017-20290
- 2026-10-24T07:15:51+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2017-20290

## From the sources

Discourse 1.9.0.beta2 before 1.9.0.beta13 contains a reflected cross-site scripting vulnerability that allows unauthenticated attackers to inject scripts through the email parameter of /email/unsubscribed. Attackers can craft GET requests with SVG onload payloads, which unsubscribed.html.erb renders unescaped via html_safe, executing JavaScript in victims' browsers. Exploitation evidence was first observed by the Shadowserver Foundation on 2023-10-19.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
