GHSA-5jq8-q6rj-9gq4

Suggest an improvement
Source
https://github.com/advisories/GHSA-5jq8-q6rj-9gq4
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/07/GHSA-5jq8-q6rj-9gq4/GHSA-5jq8-q6rj-9gq4.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-5jq8-q6rj-9gq4
Aliases
Related
Published
2024-07-11T17:32:42Z
Modified
2024-07-11T18:36:53.981647Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N CVSS Calculator
  • 6.9 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N CVSS Calculator
Summary
Red-DiscordBot vulnerable to Incorrect Authorization in commands API
Details

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/

Database specific
{
    "nvd_published_at": "2024-07-11T16:15:05Z",
    "cwe_ids": [
        "CWE-863"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2024-07-11T17:32:42Z"
}
References

Affected packages

PyPI / red-discordbot

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.5.0
Fixed
3.5.10

Affected versions

3.*

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