CVE-2026-58198: ChatterBot Local Privilege Escalation via Symlink Injection
ChatterBot versions before 1.2.14 contain a local privilege escalation vulnerability in how it extracts training data. The vulnerability exists because the software creates a predictable directory in a user's home folder and extracts compressed files into it without properly validating the destination. A local attacker who already has access to the system can create a symbolic link at the expected directory location, tricking the software into writing files to any directory they choose on the system. This requires an attacker to already have local access and knowledge of when the extraction will occur, limiting the immediate risk—but it can lead to unauthorized file manipulation within the system.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.5 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- Weaknesses (CWE)
- CWE-367, CWE-59
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-07-09 / 2026-07-09
NVD description (verbatim)
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.
5 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability resides in UbuntuCorpusTrainer.extract() method, which employs a check-then-act pattern (TOCTOU) combined with insecure archive extraction. The method writes training data to a hardcoded, predictable path (~/ubuntu_data/ubuntu_dialogs) and uses tar.extractall() without validating symlink targets. An authenticated attacker can pre-plant a symbolic link at this location before extraction is triggered, causing tar to follow the symlink and write archive contents to an attacker-controlled directory. This is a classic symlink-following vulnerability (CWE-59) compounded by a time-of-check-to-time-of-use weakness (CWE-367). The attack vector is local only, and requires low privilege (PR:L), but results in high confidentiality impact if the attacker can read extracted files or integrity impact if they can modify system-critical locations.
Business impact
Organizations running ChatterBot-based conversational systems in multi-user environments face risk of unauthorized file system manipulation. An employee or lower-privileged user could extract sensitive training data intended for the bot, exfiltrate model information, or write malicious configurations to application directories. In environments where ChatterBot runs as a service user with elevated privileges, this could enable privilege escalation or lateral movement. The impact is most acute in shared hosting, containerized deployments with weak isolation, or development environments where multiple developers share access.
Affected systems
ChatterBot versions 1.2.13 and earlier are vulnerable. The vulnerability requires local file system access and affects any deployment where UbuntuCorpusTrainer.extract() is called during setup or runtime. The ChatterBot project itself does not maintain a list of dependent commercial products, so organizations must audit their own codebase and dependencies to identify if ChatterBot is included directly or transitively. No patch information beyond version 1.2.14 is provided in the source data; verify compatibility with your deployment before upgrading.
Exploitability
Exploitation requires local system access and pre-knowledge of the extraction process. The attacker must: (1) have local user privileges on the target system; (2) create a symlink at the predicted location before UbuntuCorpusTrainer.extract() is invoked; (3) have write access to the parent directory. This is not remotely exploitable and is not listed on the CISA Known Exploited Vulnerabilities (KEV) catalog, indicating no public weaponized exploits are currently tracked by federal authorities. However, the attack is straightforward to execute once local access is gained, and the predictable path and lack of symlink validation make it a reliable technique for a determined insider or post-compromise lateral-movement scenario.
Remediation
Upgrade ChatterBot to version 1.2.14 or later. This version includes a fix to UbuntuCorpusTrainer.extract() that properly handles symlinks and validates extraction destinations. For immediate mitigation on older versions, restrict file system permissions so that only the intended service user can write to the home directory, and consider using a secure temporary extraction location with proper validation. Do not extract archives into user-controlled directories without symlink checks.
Patch guidance
Update ChatterBot to 1.2.14 as soon as feasible. Verify the version in your requirements.txt, setup.py, or poetry.lock file. Test the upgrade in a non-production environment first, particularly if you have custom trainers or extended the UbuntuCorpusTrainer class. The fix should not introduce breaking changes for standard deployments. If you cannot upgrade immediately, enforce strict file system ACLs on the ~/.ubuntu_data directory and disable extraction during runtime where possible.
Detection guidance
Monitor for symlinks created in $HOME/ubuntu_data/ or $HOME/ubuntu_data/ubuntu_dialogs before ChatterBot extraction events. Check application logs for UbuntuCorpusTrainer initialization and track which directories are being written to. Use file integrity monitoring (FIM) tools to alert on unexpected writes to sensitive application or user directories. In containerized environments, scan container images for ChatterBot versions < 1.2.14 using software composition analysis (SCA) tools. Audit process behavior to detect when tar is spawned with suspicious destination paths.
Why prioritize this
This vulnerability merits medium priority for most organizations due to its local-only attack vector and relatively low baseline exploitability. However, prioritize it higher if: (1) you run ChatterBot in a multi-tenant or shared-user environment; (2) the service runs with elevated privileges; (3) you have untrusted users with local system access; or (4) ChatterBot extraction is triggered by user-supplied data. It should not delay patching schedules but should be addressed within a normal 30–60 day remediation window.
Risk score, explained
CVSS 3.1 score of 5.5 (MEDIUM) reflects the local-only attack vector, requirement for prior authentication, and absence of network accessibility. The high confidentiality impact acknowledges that extracted training data or model files could be read, while availability is unaffected. The lack of KEV listing and absence of public exploit code lower real-world urgency, but the ease of the attack once local access is obtained and its potential for privilege escalation in certain deployments prevent a lower score.
Frequently asked questions
Do I need to patch this immediately, or can I defer it?
This is a local vulnerability, not remotely exploitable. If your ChatterBot deployment is in a secured, single-user environment with strong access controls, you can schedule it into a normal maintenance window within 30–60 days. If multiple users share local access or the service runs with elevated privileges, patch within 1–2 weeks.
Will upgrading to 1.2.14 break my custom trainers or applications?
Version 1.2.14 focuses on fixing the symlink handling in UbuntuCorpusTrainer.extract(). Standard integrations should not break. If you have overridden or extended the trainer class, review the release notes and test in a staging environment before deploying to production.
What if I don't use UbuntuCorpusTrainer—am I still at risk?
Only deployments that call UbuntuCorpusTrainer.extract() are vulnerable. If you use a different training corpus or load pre-trained models directly, this vulnerability does not affect you. Check your initialization code to confirm.
Can this vulnerability lead to remote code execution?
No, this is not an RCE vulnerability. An attacker must already have local system access to exploit it. The impact is limited to reading or writing files to attacker-chosen directories on the file system, not executing arbitrary code. However, if an attacker uses it to write to application directories, they could potentially stage further attacks.
This analysis is based on the published vulnerability description and CVSS scoring as of the data provided. Patch version numbers, KEV status, and affected product lists are sourced from official vendor advisories and CISA. Organizations should verify the applicability of this vulnerability to their specific deployments and test patches in controlled environments before production rollout. SEC.co makes no warranty regarding the completeness or accuracy of this intelligence and recommends consultation with vendor documentation and your own security team for deployment-specific guidance. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-54055MEDIUMKitty Terminal File Transmission TOCTOU Privilege Escalation
- CVE-2025-46293MEDIUMmacOS Symlink Traversal Allows Unauthorized Data Access
- CVE-2025-59610MEDIUMQualcomm Memory Corruption via IOCTL API Version Mismatch – Patch Guidance
- CVE-2026-11322MEDIUMHermes WebUI Path Traversal Vulnerability – Credential Exposure Risk
- CVE-2026-11853MEDIUMDebusine Arbitrary Symlink Creation via Manifest Path Traversal
- CVE-2026-13502MEDIUMANTLR4 Maven Plugin TOCTOU Vulnerability Guide
- CVE-2026-14160MEDIUMTOCTOU Race Condition in Samsung Escargot JavaScript Engine
- CVE-2026-14361MEDIUMPath Traversal in Consul-Template writeToFile