Impact
The vulnerable function load_word2vec_as_vocab_tensor in HanLP’s torch_util.py incorrectly handles the vectors.vocab argument, leading to the execution of deserialized data from untrusted sources. This flaw maps to CWE-502 (Deserialization of Untrusted Data) and CWE-20 (Improper Input Validation). An attacker can craft a malicious vectors.vocab payload that, when processed by the function, triggers arbitrary code execution on the host running HanLP.
Affected Systems
The issue affects the HanLP library provided by hankcs, specifically all releases through 2.1.0‑beta.64. Any installation of HanLP calling load_word2vec_as_vocab_tensor with untrusted vectors may be vulnerable. Versions newer than 2.1.0‑beta.64 are not listed as affected, suggesting they may contain a fix, though an official patch is not documented.
Risk and Exploitability
The CVSS score of 5.3 indicates moderate severity, and the EPSS score is not available; the vulnerability is not listed in CISA’s KEV catalog. Despite the lack of an official KEV listing, the publicly disclosed exploit demonstrates the ability to carry out remote attacks, implying that the attack vector is likely network‑based or through exposure of the function to untrusted data. As components of HanLP may be integrated into larger services, a successful exploit could compromise confidentiality, integrity, and availability of the affected system.
OpenCVE Enrichment