5.7medium
Potential Information Leak in User-Constructed Message Templates in nonebot2
- Severity
- 5.7medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.49% (higher than 43% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-59j8-776v-xxxgPYSEC-2024-37
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| nonebot nonebot2 | >= 2.0.0a16, < 2.2.0 | CVE List |
| nonebot2 (PyPI) | from 2.0.0a16 before 2.2.0, from 2.0.1 before 2.2.0 | GitHub Advisory Database, PyPA Advisory Database |
| nonebot nonebot | from 2.0.1 before 2.2.0, 2.0.0 | NVD |
All scores
| GitHub_M | 5.7medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N |
| GitHub | 5.7medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N |
| NVD | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| PyPA Advisory Database | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
Impact
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.
Patches
The identified vulnerability has been remedied in fix #2509 and will be included in versions released after 2.1.3. Users are strongly advised to upgrade to these patched versions to safeguard against the vulnerability.
Workarounds
A temporary workaround involves filtering underscores before incorporating user input into the message template.
References
NVD (es)
nonebot2 es un framework de chatbot asincrónico de Python multiplataforma escrito en Python. Este aviso de seguridad se refiere a una posible fuga de información (por ejemplo, variables de entorno) en casos en los que los desarrolladores utilizan "MessageTemplate" e incorporan datos proporcionados por el usuario en plantillas. La vulnerabilidad identificada se solucionó en la solicitud de extracción n.° 2509 y se incluirá en las versiones lanzadas a partir de la 2.2.0. Se recomienda encarecidamente a los usuarios que actualicen a estas versiones parcheadas para protegerse contra la vulnerabilidad. Una solución temporal implica filtrar los guiones bajos antes de incorporar la entrada del usuario en la plantilla del mensaje.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-21624 changed 2024-08-01 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-59j8-776v-xxxg changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-21624 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2024-37 changed 2024-02-16 | CC-BY-4.0 |