CVE-2024-21624: NoneBot2 - Template Injection
- Cve: CVE-2024-21624
- Name: NoneBot2 - Template Injection
- Description: 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.
- Impact: Attackers can potentially access sensitive environment variables or other information, leading to information disclosure.
- Remediation: Upgrade to version 2.2.0 or later where the issue is fixed.
- Vulnerability type: template_injection
- Vulnerability impact: information_disclosure
- Requirement type: user_interaction
- Requirements: Attacker needs to provide malicious data in message templates
- Labels source: projectdiscovery
- Severity: medium
- Cvss score: 6.5
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
- Epss score: 0.00492
- Epss percentile: 0.42819
- Assignee: [email protected]
- Published at: 2024-02-09T23:15:08Z
- Age in days: 1019
- Modified at: 2026-06-17T07:09:52Z
- Patch available: yes
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-21624
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: hackerone
Cwe
| Id | Name |
|---|---|
| CWE-200 | Exposure of Sensitive Information to an Unauthorized Actor |
| NVD-CWE-noinfo | — |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/nonebot/nonebot2/pull/2509 | nvd | Issue Tracking, Patch |
| https://github.com/nonebot/nonebot2/security/advisories/GHSA-59j8-776v-xxxg | nvd | Vendor Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| nonebot:nonebot | = 2.0.0 alpha16; = 2.0.0 beta5; = 2.0.0 beta4; = 2.0.0 rc4; = 2.0.0 beta3; = 2.0.0 rc3; >= 2.0.1, < 2.2.0; = 2.0.0; = 2.0.0 beta1; = 2.0.0 beta2; = 2.0.0 rc1; = 2.0.0 rc2 | no | nvd | /v1/products/nonebot/nonebot |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| nonebot/nonebot2 | commit, fix, package, pull, security_advisory | yes | /v1/repositories/nonebot/nonebot2 |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts