# CVE-2026-54499: Stanza: Remote Code Execution via Unsafe Pickle Deserialization in Model Loaders

> Attackers can execute arbitrary code by providing malicious model files to Stanza NLP pipelines due to unsafe pickle deserialization fallbacks.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 8 Jul 2026
- **Updated:** 9 Jul 2026
- **Also known as:** GHSA-v5jw-96jm-7h2c, PYSEC-2026-3075

## What is CVE-2026-54499?

CVE-2026-54499 is a high-severity unsafe deserialization vulnerability in stanfordnlp stanza, published on 8 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official 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.

Weakness: CWE-676 (Use of Potentially Dangerous Function), CWE-502 (Deserialization of Untrusted Data)

## Which versions are affected by CVE-2026-54499?

3 open source packages ship an affected version, including stanza. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `stanza` | PyPI | All versions | 1.12.2 |
| `stanza` | PyPI | All versions | 1.12.2 |
| `stanza` | PyPI | All versions | 1.12.2 |

Products: Stanford Stanza.

## How do I fix CVE-2026-54499?

Upgrade stanza to 1.12.2 or later.

## Is CVE-2026-54499 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54499 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-54499 and fix it if it is affected.

What it is: CVE-2026-54499 is a high-severity unsafe deserialization vulnerability in stanfordnlp stanza, published on 8 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54499 exists.

Affected packages and fixed versions:
- stanza (PyPI): affected all versions; fixed in 1.12.2
- stanza (PyPI): affected all versions; fixed in 1.12.2
- stanza (PyPI): affected all versions; fixed in 1.12.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-54499/ (Markdown: https://insights.sbomify.com/CVE-2026-54499/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-54499
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-54499
- OSV: https://osv.dev/vulnerability/CVE-2026-54499

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-54499/
Summaries are generated and may contain mistakes; the official description above is the record.
