CVE-2024-21624
MEDIUM 6.5CVSS 3.1NoneBot Potential Information Leak in User-Constructed Message Templates
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.
- Published
- 9 Feb 2024
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-1336CWE-200
- Also known as
- GHSA-59j8-776v-xxxgPYSEC-2024-37
- Sources
- NVDJSONOSV GHSA-59j8-776v-xxxgJSONOSV PYSEC-2024-37JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| OSV | PyPA | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | nonebot | nonebotcpe:2.3:a:nonebot:nonebot:*:*:*:*:*:*:*:* |
>= 2.0.1, < 2.2.0 | 2.2.0 |
| NVD | nonebot | nonebotcpe:2.3:a:nonebot:nonebot:2.0.0:-:*:*:*:*:*:* |
= 2.0.0 | |
| NVD | nonebot | nonebotcpe:2.3:a:nonebot:nonebot:2.0.0:alpha16:*:*:*:*:*:* |
= 2.0.0 | |
| NVD | nonebot | nonebotcpe:2.3:a:nonebot:nonebot:2.0.0:beta1:*:*:*:*:*:* |
= 2.0.0 | |
| NVD | nonebot | nonebotcpe:2.3:a:nonebot:nonebot:2.0.0:beta2:*:*:*:*:*:* |
= 2.0.0 | |
| NVD | nonebot | nonebotcpe:2.3:a:nonebot:nonebot:2.0.0:beta3:*:*:*:*:*:* |
= 2.0.0 | |
| NVD | nonebot | nonebotcpe:2.3:a:nonebot:nonebot:2.0.0:beta4:*:*:*:*:*:* |
= 2.0.0 | |
| NVD | nonebot | nonebotcpe:2.3:a:nonebot:nonebot:2.0.0:beta5:*:*:*:*:*:* |
= 2.0.0 | |
| NVD | nonebot | nonebotcpe:2.3:a:nonebot:nonebot:2.0.0:rc1:*:*:*:*:*:* |
= 2.0.0 | |
| NVD | nonebot | nonebotcpe:2.3:a:nonebot:nonebot:2.0.0:rc2:*:*:*:*:*:* |
= 2.0.0 | |
| NVD | nonebot | nonebotcpe:2.3:a:nonebot:nonebot:2.0.0:rc3:*:*:*:*:*:* |
= 2.0.0 | |
| NVD | nonebot | nonebotcpe:2.3:a:nonebot:nonebot:2.0.0:rc4:*:*:*:*:*:* |
= 2.0.0 | |
| OSV | PyPI | nonebot2 | >= 2.0.0a16, < 2.2.0 | 2.2.0 |
| OSV | PyPI | nonebot2 | >= 2.0.1, < 2.2.0 | 2.2.0 |
References
- https://github.com/nonebot/nonebot2/pull/2509 · Issue Tracking, Patch, WEB, FIX
- https://github.com/nonebot/nonebot2/security/advisories/GHSA-59j8-776v-xxxg · Vendor Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2024-21624 · ADVISORY
- https://github.com/nonebot/nonebot2/commit/b65b3b438c95894654fd9081139989c757bdc6c1 · WEB
- https://github.com/nonebot/nonebot2 · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/nonebot2/PYSEC-2024-37.yaml · WEB
History
- 25 Nov 2026 20:54 UTC · NVD: first stored (published 9 Feb 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 9 Feb 2024)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 9 Feb 2024)