# CVE-2022-24849: Contact to DisCatSharp-owned server using authenticated client

> DisCatSharp library versions inadvertently sent bot tokens to a third-party server, exposing credentials to the library developers.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 14 Apr 2022
- **Updated:** 23 Apr 2025
- **Also known as:** GHSA-frxg-hf44-q765

## What is CVE-2022-24849?

CVE-2022-24849 is a medium-severity vulnerability in Aiko-IT-Systems DisCatSharp, published on 14 Apr 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

DisCatSharp is a Discord API wrapper for .NET. Users of versions 9.8.5, 9.8.6, 9.9.0 and previously published prereleases of 10.0.0 who have used either one of the two `RequireDisCatSharpDeveloperAttribute`s or the `BaseDiscordClient.LibraryDeveloperTeam` have potentially had their bot token sent to a web server not affiliated with Discord. This server is owned and operated by DisCatSharp's development team. The tokens were not logged, yet it is still advisable to reset the tokens of potentially affected bots. 9.9.1 has been released to patch the issue for the current stable release and the current 10.0.0 prereleases are also no longer affected. Users unable to upgrade should remove all uses of the two `RequireDisCatSharpDeveloperAttribute`s and all direct calls to `BaseDiscordClient.LibraryDeveloperTeam`.

Weakness: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

## Which versions are affected by CVE-2022-24849?

2 open source packages ship an affected version, including DisCatSharp. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `DisCatSharp` | NuGet | From 9.8.5 | 9.9.1 |
| `DisCatSharp` | NuGet | From 9.8.5 | 9.9.1 |

Products: Aitsys Discatsharp.

## How do I fix CVE-2022-24849?

Upgrade DisCatSharp to 9.9.1 or later.

## Is CVE-2022-24849 being exploited?

There is no known exploitation of CVE-2022-24849 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-24849 and fix it if it is affected.

What it is: CVE-2022-24849 is a medium-severity vulnerability in Aiko-IT-Systems DisCatSharp, published on 14 Apr 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2022-24849 in the wild and no public exploit code.

Affected packages and fixed versions:
- DisCatSharp (NuGet): affected from 9.8.5; fixed in 9.9.1
- DisCatSharp (NuGet): affected from 9.8.5; fixed in 9.9.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-24849/ (Markdown: https://insights.sbomify.com/CVE-2022-24849/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-24849
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-24849
- OSV: https://osv.dev/vulnerability/CVE-2022-24849

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-24849/
Summaries are generated and may contain mistakes; the official description above is the record.
