pythainlp is vulnerable to Path Traversal
59
Medium Risk
Data and corpus path helpers in PyThaiNLP joined user-supplied path segments with the intended base directory using plain os.path.join without verifying the resolved path stayed inside that directory. Values containing .. segments could normalize to locations outside the PyThaiNLP data or corpus roots, so downstream file operations could touch unintended paths when callers passed untrusted or externally influenced strings. The fix centralizes containment in safe_path_join, which normalizes paths and rejects resolutions outside the base directory, and removes redundant helper paths that widened the attack surface.
You are affected if you are using a version that falls within the vulnerable range.
pythainlp is vulnerable to Path Traversal in versions 2.1 - 5.3.1.
Upgrade the pythainlp library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

SOC 2Compliant
ISO 27001Compliant