# CVE-2021-21371: Execution of untrusted code through config file

> An attacker with local access can execute arbitrary code via a crafted YAML configuration file due to unsafe deserialization in the Tenable Jira Cloud integration.

- **Severity:** Medium 5.0 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 10 Mar 2021
- **Updated:** 3 Aug 2024
- **Also known as:** GHSA-8278-88vv-x98r, PYSEC-2021-60

## What is CVE-2021-21371?

CVE-2021-21371 is a medium-severity unsafe deserialization vulnerability in tenable integration-jira-cloud, published on 10 Mar 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

Tenable for Jira Cloud is an open source project designed to pull Tenable.io vulnerability data, then generate Jira Tasks and sub-tasks based on the vulnerabilities' current state. It published in pypi as "tenable-jira-cloud". In tenable-jira-cloud before version 1.1.21, it is possible to run arbitrary commands through the yaml.load() method. This could allow an attacker with local access to the host to run arbitrary code by running the application with a specially crafted YAML configuration file. This is fixed in version 1.1.21 by using yaml.safe_load() instead of yaml.load().

Weakness: CWE-502 (Deserialization of Untrusted Data)

## Which versions are affected by CVE-2021-21371?

3 open source packages ship an affected version, including tenable-jira-cloud. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `tenable-jira-cloud` | PyPI | All versions | 1.1.21 |
| `tenable-jira-cloud` | PyPI | All versions | 1.1.21 |
| `tenable-jira-cloud` | PyPI | All versions | 1.1.22 |

Products: Tenable Jira Cloud.

## How do I fix CVE-2021-21371?

Upgrade tenable-jira-cloud to a fixed version for your release line: 1.1.21 or 1.1.22.

## Is CVE-2021-21371 being exploited?

There is no known exploitation of CVE-2021-21371 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-21371 and fix it if it is affected.

What it is: CVE-2021-21371 is a medium-severity unsafe deserialization vulnerability in tenable integration-jira-cloud, published on 10 Mar 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2021-21371 in the wild and no public exploit code.

Affected packages and fixed versions:
- tenable-jira-cloud (PyPI): affected all versions; fixed in 1.1.21
- tenable-jira-cloud (PyPI): affected all versions; fixed in 1.1.21
- tenable-jira-cloud (PyPI): affected all versions; fixed in 1.1.22

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-21371/ (Markdown: https://insights.sbomify.com/CVE-2021-21371/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-21371
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-21371
- OSV: https://osv.dev/vulnerability/CVE-2021-21371

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-21371/
Summaries are generated and may contain mistakes; the official description above is the record.
