NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
MEDIUM severity

CVE-2021-4235 — gopkg.in/yaml.v2

MEDIUMFix: go-yaml/yaml@bb4e33b

CVE-2021-4235 is a medium-severity (CVSS 5.5) vulnerability in gopkg.in/yaml.v2. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for gopkg.in/yaml.v2 — see the affected versions and patch details below.

YAML Go package vulnerable to denial of service

Also known asGHSA-r88r-gmrh-7j83GO-2021-0061
Published
Updated
Affected
2 pkgs
Patched
1 / 2
Exploits
1 known
Exploitation data as of Nov 2, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.

Exploitation and automatability from CISA’s SSVC triage for CVE-2021-4235.

EPSS Exploitation Probability

via FIRST.org ↗
0.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs37th percentile — riskier than 37% of all scored CVEsHighest risk
0.00%0.31%0.62%0.93%0.0%0.4%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

2 pkgs affected
🐹gopkg.in/yaml.v2🐹github.com/go-yaml/yaml

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

Due to unbounded alias chasing, a maliciously crafted YAML file can cause the system to consume significant system resources. If parsing user input, this may be used as a denial of service vector.

Affected Packages

2 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogopkg.in/yaml.v2all versions2.2.3go get gopkg.in/yaml.v2@v2.2.3
🐹Gogithub.com/go-yaml/yamlall versionsNo fix

Affected Products

1 product · 1 configurations
Application
yamlyaml_project
< 2.2.3
range
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for gopkg.in/yaml.v2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update gopkg.in/yaml.v2 to 2.2.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-4235 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate
ProductFixed inAdvisory
Red Hat OpenShift Container Platform 4.12openshift-clients-0:4.12.0-202301042257.p0.g854f807.assembly.stream.el8RHSA-2022:7398
Red Hat OpenShift Container Platform 4.12openshift4/ose-installer:v4.12.0-202301271115.p0.g7fea1c4.assembly.streamRHSA-2023:0569
Red Hat OpenShift Container Platform 4.12openshift4/metallb-rhel8-operator:v4.12.0-202301301729.p0.g917cd33.assembly.streamRHSA-2023:0570
Red Hat OpenShift Container Platform 4.12openshift4/ose-openshift-controller-manager-rhel8:v4.12.0-202306090942.p0.gb6528f9.assembly.streamRHSA-2023:3615
Red Hat OpenShift Container Platform 4.13openshift4/ose-installer:v4.13.0-202305091542.p0.g44db7b2.assembly.streamRHSA-2023:1326
RHODF-4.13-RHEL-9odf4/mcg-rhel9-operator:v4.13.0-41RHSA-2023:3742
UbuntuMEDIUM

Frequently Asked Questions

Due to unbounded alias chasing, a maliciously crafted YAML file can cause the system to consume significant system resources. If parsing user input, this may be used as a denial of service vector.
O3 Security · Impact-Aware SCA

Is CVE-2021-4235 in your dependencies?

Find it across Go, including transitive dependencies.

CVE-2021-4235: gopkg.in/yaml.v2 DoS — Fixed in 2.2.3