Skip to main content

HanLP EUVDEUVD-2026-131880

| CVE-2026-133836 LOW
Deserialization of Untrusted Data (CWE-502)
2026-11-20 VulDB GHSA-c6gp-rcww-7pq6
2.1
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious pickle model checkpoint
  2. Delivery
    Deliver file to victim pipeline
  3. Exploit
    load_language_model passes model_file to torch.load
  4. Execution
    Unpickler resolves attacker globals
  5. Impact
    Arbitrary 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.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

HanLP 2.1.4
HanLP 2.1.3
HanLP 2.1.1
HanLP 2.1.5
HanLP 2.1.6
HanLP 2.1.0
HanLP 2.1.2

Affected Packages

euvd hanlp no fix

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

Vendor (VulDB) PRIMARY 2.1 MEDIUM
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
vuln.today AI 7.8 HIGH

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.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulDB).

CVSS VectorVendor: VulDB

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Severity Changed
Nov 20, 2026 - 22:22 NVD
MEDIUM LOW
CVSS changed
Nov 20, 2026 - 22:22 NVD
5.3 (MEDIUM) 2.1 (LOW)
CVE Published
Nov 20, 2026 - 21:30 cve.org
LOW 2.1

DescriptionCVE.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

EPSS Score
0.4%
Top 69% exploitable
Prevalence
Medium
popular Chinese-NLP library, significant but domain-specific deployment footprint
Exploit
POC
Public exploit code exists
Social Media
2
Sightings
Data Quality
7 sources
Confidence: High

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.

SignalValue
Severity LOW
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Low

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy