Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS01anE4LXE2cmotOWdxNM4AA9zp

Red-DiscordBot vulnerable to Incorrect Authorization in commands API

Impact

Due to a bug in Red's Core API, 3rd-party cogs using the @commands.can_manage_channel() command permission check without additional permission controls may authorize a user to run a command even when that user doesn't have permissions to manage a channel.
None of the core commands or core cogs are affected. The maintainers of the project are not aware of any public 3rd-party cog utilizing this API at the time of writing this advisory.

The @commands.mod_or_can_manage_channel(), @commands.admin_or_can_manage_channel(), and @commands.guildowner_or_can_manage_channel() command permission checks are unaffected.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N/AU:Y/R:U/RE:L

Patches

The problem was patched in PR #6398 and later released in version 3.5.10.

Workarounds

Any cog using the @commands.can_manage_channel() command permission check should be unloaded until an upgrade to a patched version can be performed.

References

https://github.com/Cog-Creators/Red-DiscordBot/pull/6398
https://github.com/Cog-Creators/Red-DiscordBot/releases/tag/3.5.10
https://pypi.org/project/Red-DiscordBot/3.5.10/

Permalink: https://github.com/advisories/GHSA-5jq8-q6rj-9gq4
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS01anE4LXE2cmotOWdxNM4AA9zp
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: 3 months ago
Updated: 3 months ago


CVSS Score: 5.3
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Identifiers: GHSA-5jq8-q6rj-9gq4, CVE-2024-39905
References: Repository: https://github.com/Cog-Creators/Red-DiscordBot
Blast Radius: 7.1

Affected Packages

pypi:Red-DiscordBot
Dependent packages: 2
Dependent repositories: 22
Downloads: 553,200 last month
Affected Version Ranges: >= 3.5.0, < 3.5.10
Fixed in: 3.5.10
All affected versions: 3.5.0, 3.5.1, 3.5.2, 3.5.3, 3.5.4, 3.5.5, 3.5.6, 3.5.7, 3.5.8, 3.5.9
All unaffected versions: 3.0.0, 3.0.1, 3.0.2, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.3.10, 3.3.11, 3.3.12, 3.4.0, 3.4.1, 3.4.2, 3.4.3, 3.4.4, 3.4.5, 3.4.6, 3.4.7, 3.4.8, 3.4.9, 3.4.10, 3.4.11, 3.4.12, 3.4.13, 3.4.14, 3.4.15, 3.4.16, 3.4.17, 3.4.18, 3.4.19, 3.5.10, 3.5.11, 3.5.12, 3.5.13