Описание
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.
A flaw was found in Stanza, a Stanford NLP Python library. Stanza model loaders, such as stanza.models.common.pretrain.Pretrain.load(), attempt to safely load PyTorch checkpoint files. However, if this safe load fails due to an attacker-controllable pickle.UnpicklingError, the loaders fall back to an unsafe deserialization method. This allows a remote attacker to craft a malicious pretrain or model file that, when loaded by a Stanza NLP pipeline, can execute arbitrary code with the privileges of the affected process, leading to potential credential theft or data exfiltration.
Отчет
An unsafe deserialization vulnerability in the Stanza Python library can lead to remote code execution. A malicious model pretrain file from an untrusted or compromised source can trigger an insecure deserialization fallback during model loading, resulting in arbitrary code execution with the privileges of the affected process.
Меры по смягчению последствий
To mitigate this vulnerability, ensure that Stanza model pretrain files are exclusively sourced from trusted repositories and locations. Avoid loading model files from untrusted or unverified sources, as this could lead to the execution of arbitrary code. Implement strict access controls on directories where Stanza models are stored to prevent the introduction of malicious files.
Затронутые пакеты
| Платформа | Пакет | Состояние | Рекомендация | Релиз |
|---|---|---|---|---|
| Red Hat Ceph Storage 9 | rhceph/alloy-rhel10 | Fix deferred | ||
| Red Hat Enterprise Linux 10 | opentelemetry-collector | Not affected | ||
| Red Hat Enterprise Linux 9 | opentelemetry-collector | Not affected | ||
| Red Hat Hardened Images | opentelemetry-collector-contrib | Not affected | ||
| Red Hat OpenShift distributed tracing 3 | rhosdt/opentelemetry-collector-rhel9 | Affected |
Показывать по
Ссылки на источники
Дополнительная информация
Статус:
7.5 High
CVSS3
Связанные уязвимости
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.
Stanza: Remote Code Execution via Unsafe Pickle Deserialization in Model Loaders
7.5 High
CVSS3