CVE-2024-21624: NoneBot Potential Information Leak in User-Constructed Message Templates
5.7
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.49426%
CWE
Published
2/9/2024
Updated
2/16/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| nonebot2 | pip | >= 2.0.0a16, <= 2.1.3 | 2.2.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the template engine's attribute resolution mechanism. The original implementation in get_field didn't validate access to private attributes (those starting with underscore). The fix introduced a 'private_getattr' flag and explicit checks for attribute names starting with '_', preventing access to internal attributes unless explicitly allowed. The commit diff shows this security check was added to the get_field method, and test cases demonstrate exploitation attempts through attributes like init and builtins.