---
id: CVE-2021-43811
aliases:
  - GHSA-ggmr-44cv-24pm
  - PYSEC-2021-848
title: Code injection via unsafe YAML loading
summary: Code injection via unsafe YAML loading
severity: high
cvss: 7.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'
vendor: sockeye
product: sockeye
ecosystem: pip
affected:
  - sockeye < 2.3.24
patched:
  - sockeye 2.3.24
published: '2021-12-09'
updated: '2026-07-08'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-ggmr-44cv-24pm'
references:
  - url: 'https://github.com/awslabs/sockeye/security/advisories/GHSA-ggmr-44cv-24pm'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2021-43811'
  - url: 'https://github.com/awslabs/sockeye/pull/964'
  - url: 'https://github.com/awslabs/sockeye'
  - url: 'https://github.com/awslabs/sockeye/releases/tag/2.3.24'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/sockeye/PYSEC-2021-848.yaml
tags:
  - osv
  - pip
  - exploit-available
epss: 0.02415
epssPercentile: 0.83431
ingestedAt: '2026-07-08T18:25:49.710Z'
exploits:
  github: 1
  githubRepos:
    - 'https://github.com/s-index/CVE-2021-43811'
  checkedAt: '2026-09-25T08:20:39.893Z'
exploitAvailable: true
---

## Overview

### 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](https://github.com/awslabs/sockeye)
* Email us at [sockeye-dev](mailto:sockeye-dev@amazon.com)

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

## Affected packages

- `sockeye < 2.3.24`

## Remediation

Upgrade to a patched release:

- `sockeye 2.3.24`
