Advisories for Pypi/Chatterbot package

2026

ChatterBot: Symlink-Following Arbitrary Write via UbuntuCorpusTrainer

ChatterBot's UbuntuCorpusTrainer.extract() uses a predictable, home-rooted output directory (~/ubuntu_data/ubuntu_dialogs) with a check-then-create pattern (if not os.path.exists: os.makedirs) followed by tar.extractall(path=self.data_path). A local attacker who pre-plants a symlink at the predictable path causes os.path.exists() to return True (following the symlink), skipping makedirs, and subsequent extractall writes archive contents through the symlink to the attacker-chosen directory. The existing safe_extract function validates tar member names (zip-slip defense) but does not validate the output …