Skip to main content

CVE-2022-36024: CWE-862: Missing Authorization in Pycord-Development pycord

Medium
Published: Thu Aug 18 2022 (08/18/2022, 14:45:17 UTC)
Source: CVE
Vendor/Project: Pycord-Development
Product: pycord

Description

py-cord is a an API wrapper for Discord written in Python. Bots creating using py-cord version 2.0.0 are vulnerable to remote shutdown if they are added to the server with the `application.commands` scope without the `bot` scope. Currently, it appears that all public bots that use slash commands are affected. This issue has been patched in version 2.0.1. There are currently no recommended workarounds - please upgrade to a patched version.

AI-Powered Analysis

AILast updated: 06/22/2025, 23:34:59 UTC

Technical Analysis

CVE-2022-36024 is a vulnerability identified in the py-cord library, an API wrapper for Discord written in Python, specifically affecting version 2.0.0. The vulnerability arises from missing authorization checks (CWE-862) and improper access control (CWE-284) when bots are added to Discord servers using the 'application.commands' OAuth2 scope without the 'bot' scope. This misconfiguration allows remote attackers to forcibly shut down affected bots by exploiting the lack of proper authorization enforcement within the py-cord library's handling of slash commands. Slash commands are a popular feature in Discord bots that allow users to interact with bots via predefined commands. Since all public bots using slash commands and py-cord 2.0.0 are potentially vulnerable, the attack surface is significant. The vulnerability does not require user interaction but does require that the attacker add the bot to a server with the specific OAuth2 scope combination. The issue was patched in py-cord version 2.0.1, and no alternative workarounds are currently recommended. There have been no known exploits in the wild reported to date. The vulnerability was published on August 18, 2022, and is classified as medium severity by the vendor.

Potential Impact

For European organizations that deploy Discord bots using py-cord 2.0.0, this vulnerability poses a risk of service disruption through remote shutdown of bots. Bots often provide critical functions such as community management, customer support, or internal communication facilitation. A successful exploit could lead to denial of service for these functionalities, impacting operational continuity and user experience. Additionally, the shutdown of bots could be leveraged as part of a broader attack strategy to disrupt communication channels or degrade trust in organizational digital assets. While the vulnerability does not directly expose confidential data or allow privilege escalation, the loss of bot availability can indirectly affect organizational integrity and availability. Given the widespread use of Discord in gaming, education, and enterprise collaboration, organizations relying on bots for automation or interaction may face operational setbacks. The absence of known exploits reduces immediate risk, but the public nature of the vulnerability and the popularity of slash commands increase the likelihood of future exploitation attempts.

Mitigation Recommendations

The primary and most effective mitigation is to upgrade all py-cord instances from version 2.0.0 to version 2.0.1 or later, where the missing authorization checks have been implemented. Organizations should audit their Discord bots to identify those using py-cord 2.0.0 and prioritize patching. Additionally, bot administrators should review OAuth2 scopes granted during bot installation, ensuring that bots are not added with the 'application.commands' scope alone without the 'bot' scope, as this combination triggers the vulnerability. Implementing strict access control policies on who can add bots to servers and monitoring bot activity for unusual shutdowns can provide early detection of exploitation attempts. For organizations with critical bots, consider temporarily disabling slash commands or restricting bot additions until patching is complete. Finally, maintain awareness of updates from py-cord developers and Discord security advisories to respond promptly to any emerging threats related to this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-07-15T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9844c4522896dcbf3ba0

Added to database: 5/21/2025, 9:09:24 AM

Last enriched: 6/22/2025, 11:34:59 PM

Last updated: 8/8/2025, 6:59:41 AM

Views: 16

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats