# CVE-2021-31232: GO-2022-0915 - Improper input validation in CNCF Cortex in github.com/cortexproject/cortex

Source: https://junglewise.ai/threats/cve-2021-31232-improper-input-validation-in-cncf-cortex  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-08-21  
License: CC BY 4.0 with a link back

CVE-2021-31232 · Severity: low · CVSS 3.1 · Published 2024-08-21

Improper input validation in CNCF Cortex in github.com/cortexproject/cortex

Technologies: [github.com/cortexproject/cortex (Go)](https://junglewise.ai/threats/technologies/github-com-cortexproject-cortex). Vendors: [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

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

**How severe is CVE-2021-31232?** Low severity, with a CVSS score of 3.1, published 21 August 2024.

**Which products and versions are affected?** github.com/cortexproject/cortex (Go) SEMVER:introduced=0,fixed=1.8.1.

**Is there a fix for CVE-2021-31232?** Yes. github.com/cortexproject/cortex (Go): upgrade to 1.8.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-31232?** Check whether you run github.com/cortexproject/cortex (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

- github.com/cortexproject/cortex (Go): upgrade to 1.8.1 or later

  ```sh
  go get github.com/cortexproject/cortex@v1.8.1
  ```


## Affected products

- github.com/cortexproject/cortex (Go) SEMVER:introduced=0,fixed=1.8.1

## Identifiers

- CVE-2021-31232
- GHSA-m45g-f45x-vv22
- GO-2022-0915

## Related threats

- [GO-2024-3036 - cortex establishes TLS connections with `InsecureSkipVerify` set to `true` in github.com/cortexproject/cortex](https://junglewise.ai/threats/cve-2024-41265-cortex-establishes-tls-connections-with-insecureskipverify-set-to)
- [GO-2022-1175 - Exposure of local files in github.com/cortexproject/cortex](https://junglewise.ai/threats/cve-2022-23536-cortex-s-alertmanager-can-expose-local-files-content-via)
- [Path traversal in Grafana Cortex](https://junglewise.ai/threats/cve-2021-36157-path-traversal-in-grafana-cortex)
