Vulnerabilities in pkg:pypi/Red-DiscordBot

PACKAGE
Advisory Identifier: GHSA-7257-96vg-qf6x
Advisory Summary

CVE-2020-15147 is a HIGH (CVSS 8.5) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code 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.12.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/Red-DiscordBot

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/Red-DiscordBot. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-7257-96vg-qf6x CVE-2020-15147 HIGH Remote Code Execution in Red Discord Bot
GHSA-mp9m-g7qj-6vqr CVE-2020-15278 MODERATE Unauthorized privilege escalation in Mod module
GHSA-55j9-849x-26h4 CVE-2020-15140 MODERATE Remote Code Execution in Red Discord Bot
GHSA-5jq8-q6rj-9gq4 CVE-2024-39905 MODERATE Red-DiscordBot vulnerable to Incorrect Authorization in commands API

CVE-2020-15147 at a Glance

CVE Identifier CVE-2020-15147
GHSA Identifier GHSA-7257-96vg-qf6x
Severity HIGH
CVSS v3.1 Base Score 8.5
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Red DiscordBot
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.5

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:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2020-15147

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.

Red-DiscordBot fixed: 3.3.12
pip install Red-DiscordBot>=3.3.12
Verify Direct and Transitive Dependencies

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-15147, 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.12), 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. 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

### Impact A RCE exploit has been discovered in the Streams module: this exploit allows Discord users with specifically crafted "going live" messages to inject code into the Streams module's going live message. By abusing this exploit, it's possible to perform destructive actions and/or access sensitive information. ### Patches This critical exploit has been fixed on version ``3.3.12`` & ``3.4``. ### Workarounds Unloading the Streams module with ``unload streams`` can render this exploit not accessible. We still highly recommend updating to ``3.3.12`` or ``3.4`` to completely patch this issue. ### References * https://github.com/Cog-Creators/Red-DiscordBot/pull/4183 ### For more information If you have any questions or comments about this advisory: * Open an issue in [Cog-Creators/Red-DiscordBot](https://github.com/Cog-Creators/Red-DiscordBot) * Over on our [Discord server](https://discord.gg/red)

CVE-2020-15147 Affected Red DiscordBot Versions

1 component(s)
Fixed Versions:
3.3.12
Product / Package Ecosystem Affected Versions Fixed Version
Red-DiscordBot
PyPI
< 3.3.12
3.3.12

References

Frequently Asked Questions

What is CVE-2020-15147?
CVE-2020-15147 is a security vulnerability in Red DiscordBot involving Remote Code Execution in Red Discord Bot under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Red DiscordBot versions are affected?
Affected versions include releases prior to 3.3.12 across affected packages: Red-DiscordBot.
What version fixes CVE-2020-15147?
Upgrading to 3.3.12 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Red-DiscordBot affected?
Yes, Red-DiscordBot is affected in releases prior to 3.3.12. Upgrade your dependency to 3.3.12 or later.
What is the CVSS score of CVE-2020-15147?
CVE-2020-15147 has a CVSS v3.1 base score of 8.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2020-15147?
CVE-2020-15147 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check PyPI dependencies for CVE-2020-15147?
Run the dependency tree command: 'pip show Red-DiscordBot'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7257-96vg-qf6x",
  "modified" : "2024-10-26T18:37:01Z",
  "published" : "2020-08-21T17:03:24Z",
  "aliases" : [ "CVE-2020-15147" ],
  "summary" : "Remote Code Execution in Red Discord Bot",
  "details" : "### Impact\nA RCE exploit has been discovered in the Streams module: this exploit allows Discord users with specifically crafted \"going live\" messages to inject code into the Streams module's going live message. 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.12`` & ``3.4``.\n\n### Workarounds\nUnloading the Streams module with ``unload streams`` can render this exploit not accessible. We still highly recommend updating to ``3.3.12`` or ``3.4`` to completely patch this issue.\n\n### References\n* https://github.com/Cog-Creators/Red-DiscordBot/pull/4183\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:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Red-DiscordBot"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.3.12"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.3.11"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Cog-Creators/Red-DiscordBot/security/advisories/GHSA-7257-96vg-qf6x"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15147"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Cog-Creators/Red-DiscordBot/pull/4183"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Cog-Creators/Red-DiscordBot/pull/4183/commits/e269ea0d3bc88417163c18431b1df38a9be92bfc"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Cog-Creators/Red-DiscordBot"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/red-discordbot/PYSEC-2020-266.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74", "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-21T17:02:40Z",
    "nvd_published_at" : "2020-08-21T18:15:00Z"
  }
}