CVE-2022-3064 is a high-severity (CVSS 7.5) Uncontrolled Resource Consumption vulnerability in gopkg.in/yaml.v2. A fix is available for gopkg.in/yaml.v2 — see the affected versions and patch details below.
Excessive resource consumption in gopkg.in/yaml.v2
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2022-3064.
EPSS Exploitation Probability
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
gopkg.in/yaml.v2Real-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
Parsing malicious or large YAML documents can consume excessive amounts of CPU or memory.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | gopkg.in/yaml.v2 | all versions | 2.2.4go get gopkg.in/yaml.v2@v2.2.4 |
Affected Products
yamlyaml_projectDetection & mitigation playbook
Open-source dependencyDetect
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.
Fix
Update gopkg.in/yaml.v2 to 2.2.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-3064 is resolved across your whole dependency graph.
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.
RHC package for Red Hat Enterprise Linux 9 mark as Low severity as we do ship the affected code but it's not easily exposed because YAML files are not parsed by RHC.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Enterprise Linux 8 | container-tools:4.0-8090020230828093056.e7857ab1 | RHSA-2023:6938 |
| Red Hat Enterprise Linux 8 | container-tools:rhel8-8090020230825121312.e7857ab1 | RHSA-2023:6939 |
| Red Hat Enterprise Linux 8 | rhc-1:0.2.5-1.el8_10 | RHSA-2024:10784 |
| Red Hat Enterprise Linux 9 | toolbox-0:0.0.99.4-6.el9_3 | RHSA-2023:6346 |
| Red Hat Enterprise Linux 9 | rhc-1:0.2.5-1.el9_5 | RHSA-2024:10759 |
| Red Hat Enterprise Linux 9.2 Extended Update Support | toolbox-0:0.0.99.4-1.el9_2 | RHSA-2024:4443 |
| Red Hat OpenShift Container Platform 4.10 | openshift4/ose-configmap-reloader:v4.10.0-202302072301.p0.g1e5a18e.assembly.stream | RHSA-2023:0698 |
| Red Hat OpenShift Container Platform 4.10 | openshift4/ose-telemeter:v4.10.0-202302201054.p0.g3b5eb87.assembly.stream | RHSA-2023:0899 |
Frequently Asked Questions
Is CVE-2022-3064 in your dependencies?
Find it across Go, including transitive dependencies.