Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconGain local user account on shared system
-
DeliveryIdentify victim using UbuntuCorpusTrainer
-
ExploitPre-plant symlink at ~/ubuntu_data/ubuntu_dialogs before training run
-
InstallVictim invokes UbuntuCorpusTrainer.extract()
-
C2tar.extractall() follows symlink without validation
-
ExecuteCorpus archive contents written to attacker-chosen directory
-
ImpactAttacker reads redirected files or leverages write primitive
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture TOCTOU prevention
|
| Exploitation Conditions | Exploitation requires a local attacker with a valid user account on the same multi-user system as the victim. The victim must actively invoke ChatterBot's UbuntuCorpusTrainer.extract() method - this is not triggered automatically and is specific to users training models with the Ubuntu corpus dataset. The attacker must be able to manipulate the filesystem at the victim's ~/ubuntu_data/ path, which typically requires either write access to the victim's home directory (unlikely in properly configured systems) or the ability to pre-empt directory creation before the victim's first run (more feasible if the attacker acts before any prior training). Exploitation is meaningfully limited by: (1) requirement for local shell access on the target system; (2) the victim must be running the specific UbuntuCorpusTrainer class, not any other ChatterBot trainer; (3) on systems with proper home directory permissions, the attacker cannot reach ~/victim_home directly and must instead exploit a shared or world-writable intermediate path. Containerized or single-user deployments are not realistically exposed. |
| Impact | The CVSS 3.1 score of 5.5 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N) reflects local exploitation requiring only a standard user account, with low attack complexity given the predictable and stable target path. The official vector assigns C:H and I:N, but the mechanism also permits writing extracted corpus files to unauthorized filesystem locations, suggesting an integrity impact (I:L at minimum) may be understated. No EPSS data was provided in the input, so exploitation probability cannot be quantified. The absence of a KEV listing and the lack of any identified public proof-of-concept indicate no confirmed active exploitation. Real-world risk is bounded by the requirement for local access on a shared system where another user actively invokes UbuntuCorpusTrainer; single-user developer environments and containerized deployments face negligible additional exposure. The corpus data being extracted (Ubuntu dialog training text) is not sensitive in itself, but the write-anywhere primitive created by the symlink redirect could be leveraged to deposit files into directories the attacker does not own, representing a meaningful local privilege escalation vector on multi-user systems beyond what the C:H-only framing implies. |
| Exploit ScenarioDerived | A local attacker on a shared Linux server - such as a shared development host or a university compute cluster - learns that a victim user periodically retrains a ChatterBot model using UbuntuCorpusTrainer. Before the victim's first training run, the attacker creates a symlink at ~/victim_home/ubuntu_data/ubuntu_dialogs (if they have write access to that path) or simply waits for the victim to attempt creation and wins the race, redirecting it to /tmp/attacker_drop or another world-writable location the attacker monitors. When the victim runs training, tar.extractall() follows the symlink and deposits the extracted corpus into the attacker's chosen directory, which the attacker then reads. No public proof-of-concept has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 09, 2026
Symlink-based extraction redirect in ChatterBot prior to 1.2.14 enables a local attacker with standard user privileges to cause training corpus archive contents to be written to an attacker-controlled directory by pre-planting a symlink at the predictable path ~/ubuntu_data/ubuntu_dialogs before UbuntuCorpusTrainer.extract() runs. The check-then-create pattern preceding tar.extractall() creates a CWE-367 TOCTOU window that, on shared multi-user systems, allows the attacker to intercept the extraction target without any race if the symlink is planted before the first training run. No public exploit has been identified at time of analysis, and a vendor-released patch is available in version 1.2.14.
RemediationAI
Upgrade to ChatterBot version 1.2.14 or later, which resolves the TOCTOU symlink vulnerability in UbuntuCorpusTrainer.extract() via fix commit 82817b5c28bfd43e682b991bcc76e6f780726dbf (PR #2445: https://github.com/gunthercox/ChatterBot/pull/2445). The patched release is available at https://github.com/gunthercox/ChatterBot/releases/tag/1.2.14. If an immediate upgrade is not feasible, the most effective compensating control is to avoid executing UbuntuCorpusTrainer on shared multi-user systems altogether, removing the local attacker prerequisite. Alternatively, pre-creating ~/ubuntu_data/ubuntu_dialogs with owner-only permissions (chmod 700) before any training run reduces but does not fully eliminate the TOCTOU window since a determined attacker with prior access could still have planted the symlink earlier. Running ChatterBot training inside a dedicated container or isolated single-user environment is the strongest short-term mitigation if the patch cannot be applied immediately.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
ChatterBot (cpe:2.3:a:gunthercox:chatterbot:*:*:*:*:*:*:*:*) is a Python machine learning library for building conversational chatbots. The vulnerable code path resides in UbuntuCorpusTrainer.extract(), which downloads and unpacks Ubuntu dialog training corpus archives into the predictable, home-rooted path ~/ubuntu_data/ubuntu_dialogs. CWE-367 (Time-of-Check Time-of-Use Race Condition) applies: the code first checks whether the destination directory exists, then creates it, and subsequently calls tar.extractall(path=self.data_path). Python's tarfile.extractall() follows filesystem symlinks during extraction without additional validation, so if the target path has been replaced with a symlink between the check phase and the extract phase - or simply never existed so a symlink was pre-planted - the archive contents are deposited into the symlink's destination rather than the intended directory. The predictability of the path (rooted in the victim user's home directory, a fixed subdirectory name) makes pre-planting straightforward and does not require precise timing when the attacker acts before the first training invocation.
Know when Chatterbot gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Local low-privilege access required (AV:L, PR:L); I:L added over vendor vector because symlink redirect also deposits extracted files into unauthorized directories, constituting a write-anywhere primitive.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
ChatterBot is a machine learning, conversational dialog engine for creating chat bots. Prior to 1.2.14, UbuntuCorpusTrainer.extract() uses a predictable home-rooted output directory (~/ubuntu_data/ubuntu_dialogs) with a check-then-create pattern followed by tar.extractall(path=self.data_path), allowing a local attacker who pre-plants a symlink at the predictable path to cause archive contents to be written through the symlink to an attacker-chosen directory. This issue is fixed in version 1.2.14.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
EUVD-2026-42685
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB