CVE-2020-15140: Red DiscordBot Remote Code Execution Vulnerability
MODERATECVE-2020-15140 is a MODERATE (CVSS 8.2) remote code execution vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Red DiscordBot libraries in the PyPI ecosystem. The issue involves remote code execution in red discord bot. Remediation is available by upgrading affected packages to version 3.3.11.
CVE-2020-15140 at a Glance
Security Impact
CVSS: 8.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:N).
How to Fix CVE-2020-15140
To remediate this vulnerability, upgrade all affected Red DiscordBot dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install Red-DiscordBot>=3.3.11
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show Red-DiscordBot
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2020-15140, inspect your installed packages using pip:
pip show Red-DiscordBot
Analyze the terminal output to locate any version of Red DiscordBot in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.3.11), your application is affected.
Note: The pip show Red-DiscordBot command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Red DiscordBot, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-15140 Affected Red DiscordBot Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Red-DiscordBot
|
PyPI |
< 3.3.11
|
3.3.11
|
References
Frequently Asked Questions
What is CVE-2020-15140?
Which Red DiscordBot versions are affected?
What version fixes CVE-2020-15140?
Is Red-DiscordBot affected?
What is the CVSS score of CVE-2020-15140?
What CWE is associated with CVE-2020-15140?
How can I check PyPI dependencies for CVE-2020-15140?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-55j9-849x-26h4",
"modified" : "2024-10-25T21:45:55Z",
"published" : "2020-08-21T16:30:52Z",
"aliases" : [ "CVE-2020-15140" ],
"summary" : "Remote Code Execution in Red Discord Bot",
"details" : "### Impact\nA RCE exploit has been discovered in the Trivia module: this exploit allows Discord users with specifically crafted usernames to inject code into the Trivia module's leaderboard command. By abusing this exploit, it's possible to perform destructive actions and/or access sensitive information.\n\n### Patches\nThis critical exploit has been fixed on version 3.3.11.\n\n### Workarounds\nUnloading the Trivia module with ``unload trivia`` can render this exploit not accessible. We still highly recommend updating to 3.3.11 to completely patch this issue.\n\n### References\nhttps://github.com/Cog-Creators/Red-DiscordBot/pull/4175\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Cog-Creators/Red-DiscordBot](https://github.com/Cog-Creators/Red-DiscordBot)\n* Over on our [Discord server](https://discord.gg/red)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "Red-DiscordBot"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.3.11"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Cog-Creators/Red-DiscordBot/security/advisories/GHSA-55j9-849x-26h4"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15140"
}, {
"type" : "WEB",
"url" : "https://github.com/Cog-Creators/Red-DiscordBot/pull/4175/commits/9ab536235bafc2b42c3c17d7ce26f1cc64482a81"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Cog-Creators/Red-DiscordBot"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/red-discordbot/PYSEC-2020-265.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-74" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-21T16:30:30Z",
"nvd_published_at" : "2020-08-21T17:15:00Z"
}
}