# CVE-2020-15278: Unauthorized privilege escalation in Mod module


- **Severity:** High 7.7 (`CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 28 Oct 2020
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-mp9m-g7qj-6vqr, PYSEC-2020-267

## What is CVE-2020-15278?

CVE-2020-15278 is a high-severity vulnerability in Cog-Creators Red-DiscordBot, published on 28 Oct 2020. 

### Official description

Red Discord Bot before version 3.4.1 has an unauthorized privilege escalation exploit in the Mod module. This exploit allows Discord users with a high privilege level within the guild to bypass hierarchy checks when the application is in a specific condition that is beyond that user's control. By abusing this exploit, it is possible to perform destructive actions within the guild the user has high privileges in. This exploit has been fixed in version 3.4.1. As a workaround, unloading the Mod module with unload mod or, disabling the massban command with command disable global massban can render this exploit not accessible. We still highly recommend updating to 3.4.1 to completely patch this issue.

Weakness: CWE-863 (Incorrect Authorization)

## Which versions are affected by CVE-2020-15278?

3 open source packages ship an affected version, including red-discordbot and Red-DiscordBot. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `red-discordbot` | PyPI | All versions | 3.4.1 |
| `red-discordbot` | PyPI | All versions | 3.4.1 |
| `Red-DiscordBot` | PyPI | All versions | 3.4.1 |

Products: Cogboard Red Discord Bot.

## How do I fix CVE-2020-15278?

Upgrade red-discordbot to 3.4.1 or later.

## Is CVE-2020-15278 being exploited?

There is no known exploitation of CVE-2020-15278 in the wild and no public exploit code.

## Other vulnerabilities in Cog-Creators Red-DiscordBot

- [CVE-2020-15147](https://insights.sbomify.com/CVE-2020-15147/): Remote Code Execution in Red Discord Bot (high 8.5)
- [CVE-2020-15140](https://insights.sbomify.com/CVE-2020-15140/): Remote Code Execution in Red Discord Bot (high 8.2)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-15278 and fix it if it is affected.

What it is: CVE-2020-15278 is a high-severity vulnerability in Cog-Creators Red-DiscordBot, published on 28 Oct 2020. 
Exploitation: There is no known exploitation of CVE-2020-15278 in the wild and no public exploit code.

Affected packages and fixed versions:
- red-discordbot (PyPI): affected all versions; fixed in 3.4.1
- red-discordbot (PyPI): affected all versions; fixed in 3.4.1
- Red-DiscordBot (PyPI): affected all versions; fixed in 3.4.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-15278/ (Markdown: https://insights.sbomify.com/CVE-2020-15278/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-15278
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-15278
- OSV: https://osv.dev/vulnerability/CVE-2020-15278

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-15278/
Summaries are generated and may contain mistakes; the official description above is the record.
