CVE-2024-21624 json
Potential Information Leak in User-Constructed Message Templates in nonebot2
published 2024-02-09 2 y ago modified 2026-09-10 1 mo ago also GHSA-59j8-776v-xxxg , PYSEC-2024-37 , EUVD-2024-0119
- cvss
- 5.7
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 42%
- public exploits
- 0
- none known
Summary
nonebot2 is a cross-platform Python asynchronous chatbot framework written in Python. This security advisory pertains to a potential information leak (e.g., environment variables) in instances where developers utilize `MessageTemplate` and incorporate user-provided data into templates. The identified vulnerability has been remedied in pull request #2509 and will be included in versions released from 2.2.0. Users are strongly advised to upgrade to these patched versions to safeguard against the vulnerability. A temporary workaround involves filtering underscores before incorporating user input into the message template.
Patch / fix
- pypi nonebot2 2.2.0
- nonebot nonebot 2.2.0
- github.com/nonebot/nonebot2@b65b3b4 commit
- github.com/nonebot/nonebot2#2509 pull request
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.49% chance of exploitation in the next 30 days, higher than 42% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N |
| NVD | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| OSV | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| GitHub | 3.1 | 5.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | nonebot2 | >=2.0.0a16, <2.2.0 >=2.0.1, <2.2.0 |
2.2.0 |
Affected products
- nonebot nonebot2
Classification
References
-
github.com
/nonebot/nonebot2/pull/2509
web, issue-tracking, patch
-
github.com
/nonebot/nonebot2/commit/b65b3b438c95894654fd9081139989c757bdc6c1
web
-
github.com
/nonebot/nonebot2/security/advisories/GHSA-59j8-776v-xxxg
web, vendor-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2024-21624
advisory
-
github.com
/nonebot/nonebot2
package
-
github.com
/pypa/advisory-database/tree/main/vulns/nonebot2/PYSEC-2024-37.yaml
web
Sources
- CVE List CVE-2024-21624
- GitHub Advisory GHSA-59j8-776v-xxxg
- NVD CVE-2024-21624
- OSV PYSEC-2024-37
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.