Description
A vulnerability has been found in hankcs HanLP up to 2.1.0-beta.64. The affected element is the function load_word2vec_as_vocab_tensor of the file hanlp/utils/torch_util.py. The manipulation of the argument vectors.vocab leads to deserialization. The attack is possible to be carried out remotely. The exploit has been disclosed to the public and may be used. The project was informed of the problem early through an issue report but has not responded yet.
Published: 2026-10-19
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution via deserialization
Action: Apply Patch
AI Analysis

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.

Generated by OpenCVE AI on October 19, 2026 at 06:24 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade HanLP to a version newer than 2.1.0‑beta.64 when available, as these releases are expected to contain the deserialization fix.
  • If an upgrade is not immediately possible, restrict the use of load_word2vec_as_vocab_tensor to trusted, internal inputs only, and block any external exposure of this function if it is exposed via APIs.
  • Implement input validation or sanitization to ensure that the vectors.vocab argument cannot contain arbitrary payloads before passing it to the function; consider wrapping the call in a sandboxed environment to isolate potential deserialization effects.

Generated by OpenCVE AI on October 19, 2026 at 06:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 19 Oct 2026 05:00:00 +0000

Type Values Removed Values Added
Description A vulnerability has been found in hankcs HanLP up to 2.1.0-beta.64. The affected element is the function load_word2vec_as_vocab_tensor of the file hanlp/utils/torch_util.py. The manipulation of the argument vectors.vocab leads to deserialization. The attack is possible to be carried out remotely. The exploit has been disclosed to the public and may be used. The project was informed of the problem early through an issue report but has not responded yet.
Title hankcs HanLP torch_util.py load_word2vec_as_vocab_tensor deserialization
First Time appeared Hankcs
Hankcs hanlp
Weaknesses CWE-20
CWE-502
CPEs cpe:2.3:a:hankcs:hanlp:*:*:*:*:*:*:*:*
Vendors & Products Hankcs
Hankcs hanlp
References
Metrics cvssV2_0

{'score': 7.5, 'vector': 'AV:N/AC:L/Au:N/C:P/I:P/A:P/E:POC/RL:ND/RC:C'}

cvssV3_0

{'score': 6.3, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L/E:P/RL:X/RC:C'}

cvssV3_1

{'score': 6.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L/E:P/RL:X/RC:C'}

cvssV4_0

{'score': 5.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulDB

Published:

Updated: 2026-10-19T04:45:08.929Z

Reserved: 2026-10-18T14:05:59.370Z

Link: CVE-2026-112079

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-19T05:17:04.773

Modified: 2026-10-19T05:17:04.773

Link: CVE-2026-112079

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-19T06:30:06Z

Weaknesses
  • CWE-20

    Improper Input Validation

  • CWE-502

    Deserialization of Untrusted Data