{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-21624","id":"CVE-2024-21624","title":"Potential Information Leak in User-Constructed Message Templates in nonebot2","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 fr","descriptionLong":"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":"2024-02-09T22:16:49.974Z","updated":"2026-10-28T02:31:05.229187398Z","reserved":"2023-12-29T03:00:44.953Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"OSV"}],"rating":"medium","products":["nonebot2"],"affectedProducts":[{"vendor":"nonebot","product":"nonebot2","defaultStatus":null,"versions":[{"version":">= 2.0.0a16, < 2.2.0","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"nonebot2","purl":"pkg:pypi/nonebot2","ranges":[">=2.0.0a16 <2.2.0",">=2.0.1 <2.2.0"],"fixed":["2.2.0"],"advisory":"GHSA-59j8-776v-xxxg"}],"cwes":["CWE-200","CWE-1336"],"aliases":["GHSA-59j8-776v-xxxg","PYSEC-2024-37"],"references":[{"url":"https://github.com/nonebot/nonebot2/security/advisories/GHSA-59j8-776v-xxxg","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory","advisory","web"]},{"url":"https://github.com/nonebot/nonebot2/pull/2509","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21624.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21624","tags":["advisory"]},{"url":"https://github.com/nonebot/nonebot2/commit/b65b3b438c95894654fd9081139989c757bdc6c1","tags":["web"]},{"url":"https://github.com/nonebot/nonebot2","tags":["package"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/nonebot2/PYSEC-2024-37.yaml","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00492,"epssPercentile":0.43016,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-21624","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21624","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-21624","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-59j8-776v-xxxg","ok":true,"note":"GHSA-59j8-776v-xxxg"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-21624","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}