ChatterBot Denial of Service via SQLAlchemy Connection Pool Exhaustion (CVE-2026-23842)
by Aditya Bhatt · 2026-07-05
- Severity
- High
- CVE
- CVE-2026-23842
- Category
- misc
- Affected product
- ChatterBot (Python conversational AI library)
- Affected versions
- <= 1.2.10 (fixed in >= 1.2.11)
- Disclosed
- 2026-07-05
- Patch status
- patched
Tags
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-03 |
| Author / Researcher | Aditya Bhatt |
| CVE / Advisory | CVE-2026-23842 |
| Category | misc |
| Severity | High |
| CVSS Score | 7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) |
| Status | PoC |
| Tags | chatterbot, denial-of-service, sqlalchemy, connection-pool-exhaustion, python, cwe-400, resource-exhaustion |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | ChatterBot (Python conversational AI library) |
| Versions Affected | <= 1.2.10 (fixed in >= 1.2.11) |
| Language / Platform | Python (SQLAlchemy-backed storage adapter) |
| Authentication Required | No |
| Network Access Required | Yes (if ChatterBot is exposed via a public-facing API/service) |
Summary
ChatterBot’s default SQLAlchemy storage adapter uses an unbounded/default QueuePool configuration with no concurrency throttling, request rate limiting, or explicit session lifecycle management. When many threads call get_response() concurrently, each checks out a database connection faster than connections are released back to the pool, quickly exhausting the pool’s capacity. Once exhausted, further calls block and eventually raise sqlalchemy.exc.TimeoutError, leaving the bot hung and the hosting service unresponsive until it is manually restarted. The included PoC simply spins up 30 threads that each call get_response() simultaneously against a fresh ChatterBot instance to trigger the exhaustion.
Vulnerability Details
Root Cause
ChatterBot relies on SQLAlchemy for storage but never bounds or throttles concurrent access to get_response(), and the default QueuePool size is small relative to what a public-facing chatbot endpoint can receive, so simultaneous requests exhaust the pool faster than connections are checked back in.
Attack Vector
- Identify a service that exposes ChatterBot’s
get_response()to end users (e.g. a public chatbot API or web-integrated assistant). - Send a burst of concurrent requests/messages (the PoC uses 30 threads) to the endpoint with no authentication required.
- Each request checks out a SQLAlchemy connection from the pool faster than it is released.
- The pool’s capacity is reached; subsequent requests block and time out.
- The application hangs or raises
TimeoutError, requiring a manual restart to recover.
Impact
Unauthenticated, low-effort denial of service against any service built on ChatterBot <= 1.2.10 that is reachable over the network, resulting in persistent unavailability until manual intervention.
Environment / Lab Setup
Target: ChatterBot <= 1.2.10 with default SQLAlchemy storage adapter
Attacker: Python 3.x with chatterbot installed; `threading` (stdlib) to fire concurrent get_response() calls
Proof of Concept
PoC Script
See
CVE-2026-23842.pyin this folder.
| |
Spawns 30 concurrent threads, each calling bot.get_response("hello") against a fresh ChatBot("dos-test") instance, exhausting the SQLAlchemy QueuePool and producing TimeoutErrors / application hangs consistent with the DoS condition.
Detection & Indicators of Compromise
sqlalchemy.exc.TimeoutError: QueuePool limit of size X overflow Y reached, connection timed out
Signs of compromise:
- Repeated
sqlalchemy.exc.TimeoutErrorentries in application logs correlated with a burst of near-simultaneous chatbot requests. - Chatbot-backed service becoming unresponsive or hanging, requiring a manual process restart to recover.
- Spikes in concurrent connections to the ChatterBot service’s backing database shortly before the outage.
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade to ChatterBot >= 1.2.11 |
| Interim mitigation | Add request rate limiting / concurrency caps in front of any public-facing ChatterBot endpoint and tune SQLAlchemy pool size/timeout with proper session lifecycle management |
References
Notes
Mirrored from https://github.com/AdityaBhatt3010/CVE-2026-23842-Denial-of-Service-via-Database-Connection-Pool-Exhaustion-version-1.2.10 on 2026-07-05.
| |