CVE-2026-54499: CWE-502: Deserialization of Untrusted Data in stanfordnlp stanza
Stanza is a Stanford NLP Python library for tokenization, sentence segmentation, NER, and parsing of many human languages. Prior to 1.12.2, Stanza model loaders such as stanza.models.common.pretrain.Pretrain.load() attempt torch.load(..., weights_only=True) but fall back to torch.load(..., weights_only=False) on attacker-controllable pickle.UnpicklingError, allowing a malicious .pt pretrain or model file to execute arbitrary pickle code when a Stanza NLP pipeline loads it. This issue is fixed in version 1.12.2.
AI Analysis
Technical Summary
Stanza versions before 1.12.2 contain a deserialization vulnerability (CWE-502) in their model loading mechanism. When loading pretrain or model files, the library first attempts to load weights safely using torch.load with weights_only=True. If this fails due to a pickle.UnpicklingError, it falls back to torch.load with weights_only=False, which allows untrusted pickle data to be deserialized. This fallback can be exploited by an attacker supplying a malicious .pt file to execute arbitrary code during model loading. The vulnerability is resolved in Stanza 1.12.2 by removing or securing this unsafe fallback.
Potential Impact
An attacker who can supply a malicious .pt pretrain or model file to a Stanza NLP pipeline running a vulnerable version can execute arbitrary code on the host system during model loading. This leads to full confidentiality, integrity, and availability compromise of the affected system. The vulnerability requires user interaction to load the malicious file and has a high attack complexity due to the need to bypass the initial safe load attempt.
Mitigation Recommendations
Upgrade Stanza to version 1.12.2 or later, where this vulnerability is fixed. There is no official patch advisory text provided, but the fix is confirmed in version 1.12.2. Until upgrading, avoid loading untrusted or unauthenticated .pt pretrain or model files to prevent exploitation.
CVE-2026-54499: CWE-502: Deserialization of Untrusted Data in stanfordnlp stanza
Description
Stanza is a Stanford NLP Python library for tokenization, sentence segmentation, NER, and parsing of many human languages. Prior to 1.12.2, Stanza model loaders such as stanza.models.common.pretrain.Pretrain.load() attempt torch.load(..., weights_only=True) but fall back to torch.load(..., weights_only=False) on attacker-controllable pickle.UnpicklingError, allowing a malicious .pt pretrain or model file to execute arbitrary pickle code when a Stanza NLP pipeline loads it. This issue is fixed in version 1.12.2.
CVSS v3.1
Score 7.5high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Stanza versions before 1.12.2 contain a deserialization vulnerability (CWE-502) in their model loading mechanism. When loading pretrain or model files, the library first attempts to load weights safely using torch.load with weights_only=True. If this fails due to a pickle.UnpicklingError, it falls back to torch.load with weights_only=False, which allows untrusted pickle data to be deserialized. This fallback can be exploited by an attacker supplying a malicious .pt file to execute arbitrary code during model loading. The vulnerability is resolved in Stanza 1.12.2 by removing or securing this unsafe fallback.
Potential Impact
An attacker who can supply a malicious .pt pretrain or model file to a Stanza NLP pipeline running a vulnerable version can execute arbitrary code on the host system during model loading. This leads to full confidentiality, integrity, and availability compromise of the affected system. The vulnerability requires user interaction to load the malicious file and has a high attack complexity due to the need to bypass the initial safe load attempt.
Mitigation Recommendations
Upgrade Stanza to version 1.12.2 or later, where this vulnerability is fixed. There is no official patch advisory text provided, but the fix is confirmed in version 1.12.2. Until upgrading, avoid loading untrusted or unauthenticated .pt pretrain or model files to prevent exploitation.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-15T18:01:15.511Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a4f575268715ace43edbe14
Added to database: 07/09/2026, 08:09:54 UTC
Last enriched: 07/16/2026, 10:19:11 UTC
Last updated: 08/23/2026, 02:08:18 UTC
Views: 91
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.