Potential Information Leak in User-Constructed Message Templates in nonebot2
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Information disclosure, Code execution
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-200 and CWE-1336.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| nonebot | nonebot2 | 2.0.0a16 to before 2.2.0 | 2.2.0 | Patch available | CNA |
| — | nonebot2 (PyPI) | 2.0.0a16 to before 2.2.0 | 2.2.0 | Patch available | GHSA-59j8-776v-xxxg |
- nonebot2 Vendornonebot Affected 2.0.0a16 to before 2.2.0 Fixed in 2.2.0 Patch available CNA
- nonebot2 (PyPI) Vendor— Affected 2.0.0a16 to before 2.2.0 Fixed in 2.2.0 Patch available GHSA-59j8-776v-xxxg
CPE configurations NVD · 12
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:nonebot:nonebot:*:*:*:*:*:*:*:* | 2.0.1 to before 2.2.0 | Vulnerable | nonebot |
| cpe:2.3:a:nonebot:nonebot:2.0.0:-:*:*:*:*:*:* | 2.0.0 | Vulnerable | nonebot |
| cpe:2.3:a:nonebot:nonebot:2.0.0:alpha16:*:*:*:*:*:* | 2.0.0 alpha16 | Vulnerable | nonebot |
| cpe:2.3:a:nonebot:nonebot:2.0.0:beta1:*:*:*:*:*:* | 2.0.0 beta1 | Vulnerable | nonebot |
| cpe:2.3:a:nonebot:nonebot:2.0.0:beta2:*:*:*:*:*:* | 2.0.0 beta2 | Vulnerable | nonebot |
| cpe:2.3:a:nonebot:nonebot:2.0.0:beta3:*:*:*:*:*:* | 2.0.0 beta3 | Vulnerable | nonebot |
| cpe:2.3:a:nonebot:nonebot:2.0.0:beta4:*:*:*:*:*:* | 2.0.0 beta4 | Vulnerable | nonebot |
| cpe:2.3:a:nonebot:nonebot:2.0.0:beta5:*:*:*:*:*:* | 2.0.0 beta5 | Vulnerable | nonebot |
| cpe:2.3:a:nonebot:nonebot:2.0.0:rc1:*:*:*:*:*:* | 2.0.0 rc1 | Vulnerable | nonebot |
| cpe:2.3:a:nonebot:nonebot:2.0.0:rc2:*:*:*:*:*:* | 2.0.0 rc2 | Vulnerable | nonebot |
- cpe:2.3:a:nonebot:nonebot:*:*:*:*:*:*:*:* Versions 2.0.1 to before 2.2.0 Vulnerable ·nonebot
- cpe:2.3:a:nonebot:nonebot:2.0.0:-:*:*:*:*:*:* Versions 2.0.0 Vulnerable ·nonebot
- cpe:2.3:a:nonebot:nonebot:2.0.0:alpha16:*:*:*:*:*:* Versions 2.0.0 alpha16 Vulnerable ·nonebot
- cpe:2.3:a:nonebot:nonebot:2.0.0:beta1:*:*:*:*:*:* Versions 2.0.0 beta1 Vulnerable ·nonebot
- cpe:2.3:a:nonebot:nonebot:2.0.0:beta2:*:*:*:*:*:* Versions 2.0.0 beta2 Vulnerable ·nonebot
- cpe:2.3:a:nonebot:nonebot:2.0.0:beta3:*:*:*:*:*:* Versions 2.0.0 beta3 Vulnerable ·nonebot
- cpe:2.3:a:nonebot:nonebot:2.0.0:beta4:*:*:*:*:*:* Versions 2.0.0 beta4 Vulnerable ·nonebot
- cpe:2.3:a:nonebot:nonebot:2.0.0:beta5:*:*:*:*:*:* Versions 2.0.0 beta5 Vulnerable ·nonebot
- cpe:2.3:a:nonebot:nonebot:2.0.0:rc1:*:*:*:*:*:* Versions 2.0.0 rc1 Vulnerable ·nonebot
- cpe:2.3:a:nonebot:nonebot:2.0.0:rc2:*:*:*:*:*:* Versions 2.0.0 rc2 Vulnerable ·nonebot
Remediation
- Fix · CNA nonebot2 (nonebot) Fixed in 2.2.0
- Fix · GHSA-59j8-776v-xxxg nonebot2 (PyPI) Fixed in 2.2.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-21624
- 2026-10-03 Alias added: GHSA-59j8-776v-xxxg
References
Advisory 2
Sources
- CVE-2024-21624 · CVE Program
- CVE-2024-21624 · NVD
- FIRST EPSS
- GHSA-59j8-776v-xxxg · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences