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 package | Versions | Reported by |
|---|---|---|
| awslabs sockeye | < 2.3.24 | CVE List |
| sockeye (PyPI) | before 2.3.24 | GitHub Advisory Database, PyPA Advisory Database |
| amazon sockeye | before 2.3.24 | NVD |
All scores
| GitHub_M | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| GitHub | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 6.8medium CVSS:2.0 | AV: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:
- Open an issue in awslabs/sockeye
- Email us at sockeye-dev
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
| https://github.com/awslabs/sockeye/security/advisories/GHSA-ggmr-44cv-24pm | advisory, third-party-advisory, web | |
| https://github.com/awslabs/sockeye/pull/964 | patch, third-party-advisory, web | |
| https://github.com/awslabs/sockeye/releases/tag/2.3.24 | release-notes, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-43811 | advisory | |
| https://github.com/awslabs/sockeye | package | |
| https://github.com/pypa/advisory-database/tree/main/vulns/sockeye/PYSEC-2021-848.yaml | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-43811 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-ggmr-44cv-24pm changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-43811 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2021-848 changed 2023-11-08 | CC-BY-4.0 |