Vulnerability · Published Feb 9, 2024 · Assigned by GitHub_M

CVE-2024-21624Potential Information Leak in User-Constructed Message Templates in nonebot2

Medium 5.7

In plain English

A medium-severity information exposure in nonebot2 from nonebot. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 42% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.7Medium
Exploit odds (30 days)0.5%top 57.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPInonebot22.2.0GHSA-59j8-776v-xxxg
PyPInonebot22.2.0PYSEC-2024-37

Affected products (as reported)

VendorProductVersions
nonebot nonebot2 >= 2.0.0a16, < 2.2.0

Weakness: CWE-200 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N

References