Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious pickle model checkpoint
-
DeliveryDeliver file to victim pipeline
-
Exploitload_language_model passes model_file to torch.load
-
ExecutionUnpickler resolves attacker globals
-
ImpactArbitrary code execution on host
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V1 - Encoding and Sanitization Safe deserialization, type allowlists
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an application to invoke RNNLanguageModel.load_language_model (or the RNNLanguageModel.forward path) with an attacker-controlled or attacker-tampered model_file; in versions up to 2.1.6 that argument is handed directly to torch.load, which unpickles arbitrary Python globals. LIMITING FACTORS: the victim must be induced to load an untrusted checkpoint - deployments that only load trusted, vendor-supplied model files are not exposed; this is a library function rather than a network-listening service, so there is no default remotely reachable endpoint; and the input CVSS asserts PR:L, implying some level of privilege/access is assumed. The only complete fix per the vendor is upgrading the affected component to 2.1.7. |
| Impact | The signals conflict sharply. VulDB scores this CVSS 4.0 2.1 (Low) with VC:L/VI:L/VA:L and PR:L, but the underlying flaw is CWE-502 deserialization through an unrestricted torch.load call, which is a classic arbitrary-code-execution primitive - the patch itself replaces torch.load with an allowlist-based Unpickler whose own tests prove a crafted checkpoint could execute code (eval payload) on load. That strongly suggests the Low impact rating understates real severity; verify impact scope with the vendor rather than trusting the 2.1 base score. On the mitigating side: this is not in CISA KEV, no EPSS probability was supplied, the vuln.today Decision label is 'monitor' (not act_now/emergency), and the PoC is only a referenced gist, not verified working exploit code. Real-world risk is gated almost entirely by whether the deploying application ever loads an untrusted or attacker-influenced model file; systems that only load trusted vendor checkpoints face low practical risk, while pipelines that accept user-supplied model files face code-execution risk. Note also a mechanism mismatch: the advisory says the attack 'may be performed from remote,' but the actual trigger is loading a crafted model_file, i.e. a file-delivery/local path rather than a listening network service - treat the remote qualifier with caution. |
| Exploit ScenarioDerived | An attacker crafts a malicious model checkpoint whose pickle stream runs code when deserialized; when an application built on HanLP ≤ 2.1.6 calls RNNLanguageModel.load_language_model (which passes model_file straight to torch.load) on that attacker-influenced file, the embedded payload executes in the host process. A public PoC reference (a GitHub gist) exists but is not verified as working exploit code; the pre-patch code path and the restricted-unpickler fix confirm the deserialization mechanism. Exploitation realistically depends on the victim being induced to load the untrusted checkpoint. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 20, 2026
Deserialization of untrusted model checkpoints in HanLP through 2.1.6 allows code execution in the process that loads them, because RNNLanguageModel.load_language_model passes the model_file argument directly to torch.load, which unpickles arbitrary Python globals. Exploitation requires an application that hands that function an attacker-supplied or attacker-tampered checkpoint: this is a library call rather than a network-listening service, and deployments that only load trusted, vendor-supplied model files are not exposed. A public PoC reference exists but is not verified as working exploit code; the vendor fixes the issue in 2.1.7, while the submitted CVSS 4.0 score of 2.1 conflicts sharply with the assessed vector, which rates confidentiality, integrity and availability impact as high.
RemediationAI
Upgrade HanLP to 2.1.7, which the vendor states is sufficient to fix this issue and is the only complete fix; commit 6962907e37dfa467fa6dee164b5b1d0a904b24db replaces the torch.load call with the restricted load_tensor_checkpoint reader and bumps hanlp/version.py to 2.1.7 (https://github.com/hankcs/HanLP/commit/6962907e37dfa467fa6dee164b5b1d0a904b24db, advisory https://vuldb.com/vuln/441459). If the upgrade cannot be applied immediately, treat every model checkpoint as executable code: load only trusted, integrity-verified model files that ship with the application, never accept a model_file path or content from user input, uploads, or remote downloads, and keep model artifacts out of writable or shared directories so they cannot be tampered with. Those constraints remove the attacker's ability to influence the deserialized input, but the unsafe torch.load call remains in place for any path that is missed, so this is a stopgap rather than a substitute for 2.1.7; the available sources document no other vendor workaround.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw is CWE-502 (deserialization of untrusted data) in the HanLP natural language processing library, in the RNNLanguageModel class of hanlp/layers/embeddings/contextual_string_embedding.py. In versions up to 2.1.6 the load_language_model path (also reached through RNNLanguageModel.forward) calls torch.load(model_file), and torch.load reconstructs Python objects through pickle, so a crafted checkpoint can name arbitrary callables in its __reduce__ and run them in the loading process. The CPE cpe:2.3:a:hankcs:hanlp:*:*:*:*:*:*:*:* matches the pre-fix range. The 2.1.7 commit 6962907e37dfa467fa6dee164b5b1d0a904b24db adds hanlp/utils/torch_serialization.py, a restricted pickle._Unpickler with an explicit global allowlist limited to collections.OrderedDict, torch._utils._rebuild_tensor and _rebuild_tensor_v2, and genuine torch/torch.cuda storage classes that are members of torch._storage_classes; it raises UnpicklingError for pickle extension opcodes so the process-wide extension cache cannot be used to bypass find_class, refuses to dispatch TorchScript archives to torch.jit.load, and invokes the serialization format readers directly because PyTorch 1.13.1 discards an explicitly supplied pickle_module. Accompanying tests in tests/test_safe_torch_serialization.py exercise pickle protocols 2 and 4, zip and legacy streams, and blocking of payload execution; a public gist reference (https://gist.github.com/zewolkt3939/8f665b80c0878e5efde324c255d1abcd) is tracked as an exploit reference but is not verified as working exploit code.
Know when Hanlp gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
Unpickling an attacker-supplied model file via torch.load yields full code execution (C/I/A High), but the victim must load the untrusted file, so AV:L and UI:R with PR:N.
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
Lifecycle Timeline
3DescriptionCVE.org
A vulnerability has been found in hankcs HanLP up to 2.1.6. The affected element is the function RNNLanguageModel.load_language_model of the file hanlp/layers/embeddings/contextual_string_embedding.py. Such manipulation of the argument model_file leads to deserialization. The attack may be performed from remote. The exploit has been disclosed to the public and may be used. Upgrading to version 2.1.7 is sufficient to fix this issue. The name of the patch is 6962907e37dfa467fa6dee164b5b1d0a904b24db. The affected component should be upgraded.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.
Path traversal in HanLP through 2.1.6 allows a crafted TAR/TAR.GZ archive to write files outside the intended extraction
Unsafe deserialization in hankcs HanLP through 2.1.0-beta.64 allows unauthenticated remote attackers to achieve code exe
Deserialization of untrusted data in HanLP through 2.1.0-beta.64 allows an attacker who supplies a crafted vectors.vocab
EUVD-2026-131880
GHSA-c6gp-rcww-7pq6
NVD
CVE.org
EPSS
VulDB
Exploit-DB