# CVE-2021-4235: GO-2021-0061 - Denial of service in gopkg.in/yaml.v2

Source: https://junglewise.ai/threats/cve-2021-4235-yaml-go-package-vulnerable-to-denial-of-service  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-04-14  
License: CC BY 4.0 with a link back

CVE-2021-4235 · Severity: low · CVSS 3.1 · Published 2021-04-14

Denial of service in gopkg.in/yaml.v2

Technologies: [gopkg.in/yaml.v2 (Go)](https://junglewise.ai/threats/technologies/gopkg-in-yaml-v2). Vendors: [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2021-4235 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-4235 being exploited in the wild.

**How severe is CVE-2021-4235?** Low severity, with a CVSS score of 3.1, published 14 April 2021.

**Which products and versions are affected?** github.com/go-yaml/yaml (Go) SEMVER:introduced=0, SEMVER:introduced=0,last_affected=2.1.0; gopkg.in/yaml.v2 (Go) SEMVER:introduced=0,fixed=2.2.3.

**Is there a fix for CVE-2021-4235?** Yes. gopkg.in/yaml.v2 (Go): upgrade to 2.2.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-4235?** Check whether you run github.com/go-yaml/yaml (Go) or gopkg.in/yaml.v2 (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- gopkg.in/yaml.v2 (Go): upgrade to 2.2.3 or later

  ```sh
  go get gopkg.in/yaml.v2@v2.2.3
  ```


## Affected products

- github.com/go-yaml/yaml (Go) SEMVER:introduced=0, SEMVER:introduced=0,last_affected=2.1.0
- gopkg.in/yaml.v2 (Go) SEMVER:introduced=0,fixed=2.2.3

## Identifiers

- CVE-2021-4235
- GHSA-r88r-gmrh-7j83
- GO-2021-0061

## Related threats

- [GO-2022-0956 - Excessive resource consumption in gopkg.in/yaml.v2](https://junglewise.ai/threats/cve-2022-3064-yaml-package-for-go-can-consume-excessive-amounts-of-cpu-or-memory)
- [GO-2020-0036 - Excessive resource consumption in YAML parsing in gopkg.in/yaml.v2](https://junglewise.ai/threats/cve-2019-11254-excessive-platform-resource-consumption-within-a-loop-in)
