CVE-2021-43811
JSON

7.8high

Code injection via unsafe YAML loading

Severity
7.8high CVSS:3.1 by GitHub_M
Exploit likelihood
2.47% (higher than 84% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-ggmr-44cv-24pmPYSEC-2021-848

Description

Sockeye is an open-source sequence-to-sequence framework for Neural Machine Translation built on PyTorch. Sockeye uses YAML to store model and data configurations on disk. Versions below 2.3.24 use unsafe YAML loading, which can be made to execute arbitrary code embedded in config files. An attacker can add malicious code to the config file of a trained model and attempt to convince users to download and run it. If users run the model, the embedded code will run locally. The issue is fixed in version 2.3.24.

Affected

Product or packageVersionsReported by
awslabs sockeye< 2.3.24CVE List
sockeye (PyPI)before 2.3.24GitHub Advisory Database, PyPA Advisory Database
amazon sockeyebefore 2.3.24NVD

All scores

GitHub_M7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
GitHub7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD6.8medium CVSS:2.0AV:N/AC:M/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

Sockeye is an open-source sequence-to-sequence framework for Neural Machine Translation built on PyTorch. Sockeye uses YAML to store model and data configurations on disk. Versions below 2.3.24 use unsafe YAML loading, which can be made to execute arbitrary code embedded in config files. An attacker can add malicious code to the config file of a trained model and attempt to convince users to download and run it. If users run the model, the embedded code will run locally. The issue is fixed in version 2.3.24.

GitHub Advisory Database
Impact

Sockeye uses YAML to store model and data configurations on disk. Versions below 2.3.24 use unsafe YAML loading, which can be made to execute arbitrary code embedded in config files.

An attacker can add malicious code to the config file of a trained model and attempt to convince users to download and run it. If users run the model, the embedded code will run locally.

Patches

The issue is fixed in version 2.3.24 and above by #964.

For more information

If you have any questions or comments about this advisory:

Attribution

This vulnerability was reported by Masatoshi Yoshizawa of yamory Security Team.

NVD (es)

Sockeye es un marco de trabajo de secuencia a secuencia de código abierto para la traducción automática neuronal construido sobre PyTorch. Sockeye usa YAML para almacenar configuraciones de modelos y datos en el disco. Las versiones anteriores a 2.3.24, usan una carga insegura de YAML, que puede hacer que se ejecute código arbitrario incrustado en los archivos de configuración. Un atacante puede añadir código malicioso al archivo de configuración de un modelo entrenado e intentar convencer a los usuarios de que lo descarguen y lo ejecuten. Si los usuarios ejecutan el modelo, el código insertado se ejecutará localmente. El problema ha sido corregido en la versión 2.3.24

References

Sources

SourceRecordLicence
CVE ListCVE-2021-43811 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-ggmr-44cv-24pm changed 2026-07-08CC-BY-4.0
NVDCVE-2021-43811 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2021-848 changed 2023-11-08CC-BY-4.0