---
title: "discourse/discourse: functions and files changed by CVE fixes"
url: https://radicalnotion.ai/fixes/discourse/discourse
type: fixes-repository
description: "159 CVE fixes in discourse/discourse changed 498 functions across 302 files."
updated: 2026-10-14
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# discourse/discourse: patched functions

- **CVEs with a located fix:** 159
- **Functions patched:** 498
- **Files patched:** 302
- **Diff hunks:** 2,476
- **Languages:** ruby, javascript, template
- **Rank by CVE fixes:** 18 of 12,313
- **First fix:** 2019-07-29
- **Latest fix:** 2026-10-14
- **Repository:** [https://github.com/discourse/discourse](https://github.com/discourse/discourse)

## Typical fix size

- Median lines changed per fix: 20
- Fixes touching a single function: 29%
- Fixes under 20 changed lines: 50%

## Most-patched functions

| Function | File | CVEs | Patches | Last fixed |
| --- | --- | --- | --- | --- |
| [self](https://radicalnotion.ai/fixes/discourse/discourse/self) | lib/pretty\_text.rb | 9 | 8 | 2026-09-24 |
| [reply\_to](https://radicalnotion.ai/fixes/discourse/discourse/reply_to) | plugins/discourse-ai/lib/ai\_bot/playground.rb | 6 | 8 | 2026-09-24 |
| [publish\_final\_update](https://radicalnotion.ai/fixes/discourse/discourse/publish_final_update) | plugins/discourse-ai/lib/ai\_bot/playground.rb | 6 | 8 | 2026-09-24 |
| [finish](https://radicalnotion.ai/fixes/discourse/discourse/finish) | plugins/discourse-ai/lib/ai\_bot/playground.rb | 6 | 8 | 2026-09-24 |
| [publish\_update](https://radicalnotion.ai/fixes/discourse/discourse/publish_update) | plugins/discourse-ai/lib/ai\_bot/playground.rb | 6 | 8 | 2026-09-24 |
| [anonymous\_default\_navigation\_menu\_tags](https://radicalnotion.ai/fixes/discourse/discourse/anonymous_default_navigation_menu_tags) | app/serializers/site\_serializer.rb | 5 | 8 | 2026-09-24 |
| [can\_delete\_own\_topic](https://radicalnotion.ai/fixes/discourse/discourse/can_delete_own_topic) | lib/guardian/topic\_guardian.rb | 5 | 8 | 2026-09-24 |
| [left\_joins](https://radicalnotion.ai/fixes/discourse/discourse/left_joins) | app/models/reviewable.rb | 5 | 8 | 2026-09-24 |
| [applyLocalDates](https://radicalnotion.ai/fixes/discourse/discourse/applyLocalDates) | plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js | 6 | 6 | 2026-09-24 |
| [patch](https://radicalnotion.ai/fixes/discourse/discourse/patch) | config/routes.rb | 4 | 6 | 2025-05-05 |
| [self](https://radicalnotion.ai/fixes/discourse/discourse/self) | lib/middleware/anonymous\_cache.rb | 7 | 5 | 2026-09-24 |
| [self](https://radicalnotion.ai/fixes/discourse/discourse/self) | app/models/invite\_redeemer.rb | 2 | 5 | 2022-11-14 |
| [self](https://radicalnotion.ai/fixes/discourse/discourse/self) | lib/onebox/engine.rb | 10 | 4 | 2026-09-24 |
| [output](https://radicalnotion.ai/fixes/discourse/discourse/output) | plugins/chat/lib/discourse\_workflows/nodes/chat\_message\_created/v1.rb | 8 | 4 | 2026-09-24 |
| [excerpt](https://radicalnotion.ai/fixes/discourse/discourse/excerpt) | plugins/chat/app/serializers/chat/message\_serializer.rb | 8 | 4 | 2026-09-24 |

## Most-patched files

| File | CVEs | Functions |
| --- | --- | --- |
| lib/onebox/engine.rb | 10 | 1 |
| lib/middleware/anonymous\_cache.rb | 9 | 5 |
| lib/pretty\_text.rb | 9 | 4 |
| frontend/pretty-text/addon/sanitizer.js | 9 | 2 |
| plugins/chat/app/models/chat/message.rb | 8 | 2 |
| app/models/concerns/has\_url.rb | 8 | 1 |
| frontend/discourse/app/instance-initializers/video-placeholder.js | 8 | 1 |
| lib/pretty\_text/helpers.rb | 8 | 1 |
| plugins/chat/app/models/chat/thread.rb | 8 | 1 |
| plugins/chat/app/serializers/chat/in\_reply\_to\_serializer.rb | 8 | 1 |

## Latest CVE fixes

| CVE | Title | Severity | CVSS | CISA KEV | Functions changed | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-91157 | Discourse: Media uploads remain publicly accessible after category permissions are restricted | high | 7.5 | No | run, Jobs, where | 2026-10-14 |
| CVE-2026-91156 | Discourse: Chat MessageBus delivers read-restricted messages to unauthorized users | high | 7.5 | No | self, self | 2026-10-14 |
| CVE-2026-91159 | Discourse: Stored oEmbed HTML injection via allowed iframe | high | 7.7 | No | trusted\_html\_provider, embedded\_html | 2026-10-14 |
| CVE-2026-91119 | Discourse: Encode action\_code\_who in mention URLs | medium | 6.4 | No | lookup\_upload\_urls, sanitize, css | 2026-09-24 |
| CVE-2026-91121 | Discourse: Chat upload filenames rendered as raw HTML in excerpts | medium | 5.0 | No | excerpt\_for\_display, excerpt, upload\_filename\_excerpt | 2026-09-24 |
| CVE-2026-91120 | Discourse: Stored HTML injection in video notification emails | medium | 5.4 | No | css, to\_html, lookup\_upload\_urls | 2026-09-24 |
| CVE-2026-91132 | Discourse: Wildcard iframe origin allowlist bypass via authority separators | medium | 4.3 | No | lookup\_upload\_urls, sanitize, css | 2026-09-24 |
| CVE-2026-91122 | Discourse: Chat MessageBus delivers read-restricted messages to unauthorized users | high | 8.7 | No | includes, lookup\_upload\_urls, sanitize | 2026-09-24 |
| CVE-2026-91123 | Discourse: Reject literal backslash path separators in iframe src traversal guard | high | 7.2 | No | sanitize, lookup\_upload\_urls, css | 2026-09-24 |
| CVE-2026-91133 | Discourse: Escape LIKE metacharacters in upload paths to prevent disclosure | medium | 6.5 | No | lookup\_upload\_urls, self, sanitize | 2026-09-24 |
| CVE-2026-91134 | Discourse: Block post iframes whose encoded userinfo bypasses the allowed\_iframes allowlist | medium | 5.4 | No | replace, sanitize, lookup\_upload\_urls | 2026-09-24 |
| CVE-2026-84302 | Discourse: Non-participant moderators can read, edit, and delete PM content through Discourse AI reviewables | medium | 4.2 | No | left\_joins, can\_delete\_own\_topic, reply\_to | 2026-09-24 |

## Frequently asked questions

### How many CVEs have a located fix in discourse/discourse?

159 published CVEs have a fix traced to functions in discourse/discourse, touching 498 functions across 302 files.

### Which function in discourse/discourse has been patched most often?

self in lib/pretty\_text.rb has been changed by 8 distinct patches, fixing 9 CVEs, from 2026 to 2026.

### How large is a typical CVE fix in discourse/discourse?

The median fix changes 20 lines. 50% of fixes change 20 lines or fewer, and 29% change a single function.

### How is a fix located to a function?

The upstream fix commit for each CVE is fetched and its diff is split into hunks. Each hunk is attributed to the function, method or type it changes, using the definition the diff itself names. Backports of the same fix to stable branches are counted once.

## Similar repositories

- [liferay/liferay-portal](https://radicalnotion.ai/fixes/liferay/liferay-portal) (159 CVEs)
- [WWBN/AVideo](https://radicalnotion.ai/fixes/wwbn/avideo) (159 CVEs)
- [apache/tomcat](https://radicalnotion.ai/fixes/apache/tomcat) (161 CVEs)
- [openemr/openemr](https://radicalnotion.ai/fixes/openemr/openemr) (156 CVEs)
- [django/django](https://radicalnotion.ai/fixes/django/django) (154 CVEs)
- [jenkinsci/jenkins](https://radicalnotion.ai/fixes/jenkinsci/jenkins) (167 CVEs)
- [MISP/MISP](https://radicalnotion.ai/fixes/misp/misp) (169 CVEs)
- [FreeRDP/FreeRDP](https://radicalnotion.ai/fixes/freerdp/freerdp) (145 CVEs)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/fixes/discourse/discourse). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
