# CVE-2020-35459: ClusterLabs crmsh vulnerable to shell code injection

> Local attackers can execute arbitrary commands via shell injection in the crm history command, potentially escalating privileges.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 Jan 2021
- **Updated:** 4 Aug 2024
- **Also known as:** DEBIAN-CVE-2020-35459, DLA-2533-1, GHSA-99xx-83jm-h24m, PYSEC-2026-799, SUSE-SU-2021:0083-1, SUSE-SU-2021:0084-1, SUSE-SU-2021:0085-1, SUSE-SU-2021:0086-1, SUSE-SU-2021:0087-1, SUSE-SU-2021:2238-1, SUSE-SU-2021:2239-1, SUSE-SU-2021:2435-1, SUSE-SU-2021:3121-1, UBUNTU-CVE-2020-35459, USN-6711-1, openSUSE-SU-2021:0055-1, openSUSE-SU-2021:0073-1, openSUSE-SU-2021:1087-1, openSUSE-SU-2021:2435-1, openSUSE-SU-2024:10700-1

## What is CVE-2020-35459?

CVE-2020-35459 is a high-severity command injection vulnerability in Debian Debian Linux, published on 12 Jan 2021. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

An issue was discovered in ClusterLabs crmsh through 4.2.1. Local attackers able to call "crm history" (when "crm" is run) were able to execute commands via shell code injection to the crm history commandline, potentially allowing escalation of privileges.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2020-35459?

3 open source packages ship an affected version, including crmsh. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `crmsh` | PyPI | All versions to 4.2.1 | None |
| `crmsh` | PyPI | All versions to 4.2.1 | None |
| `crmsh` | PyPI | All versions to 4.2.1 | None |
| `crmsh` | SUSE:Linux Enterprise High Availability Extension 12 SP3 | All versions | 3.0.4+git.1607490926.e492f845-13.56.1 |
| `crmsh` | SUSE:Linux Enterprise High Availability Extension 12 SP4 | All versions | 4.1.0+git.1607482714.9633b80d-2.50.1 |
| `crmsh` | SUSE:Linux Enterprise High Availability Extension 12 SP4 | All versions | 4.1.1+git.1630047134.803a70f2-2.65.1 |
| `crmsh` | SUSE:Linux Enterprise High Availability Extension 12 SP5 | All versions | 4.1.0+git.1607482714.9633b80d-2.50.1 |
| `crmsh` | SUSE:Linux Enterprise High Availability Extension 12 SP5 | All versions | 4.1.1+git.1630047134.803a70f2-2.65.1 |
| `crmsh` | SUSE:Linux Enterprise High Availability Extension 15 | All versions | 4.2.0+git.1607075079.a25648d8-3.56.1 |
| `crmsh` | SUSE:Linux Enterprise High Availability Extension 15 | All versions | 4.3.1+20210624.67223df2-3.74.1 |
| `crmsh` | SUSE:Linux Enterprise High Availability Extension 15 SP1 | All versions | 4.2.0+git.1607075079.a25648d8-3.51.1 |
| `crmsh` | SUSE:Linux Enterprise High Availability Extension 15 SP1 | All versions | 4.3.1+20210624.67223df2-3.69.1 |
| `crmsh` | SUSE:Linux Enterprise High Availability Extension 15 SP2 | All versions | 4.2.0+git.1607075079.a25648d8-5.32.1 |
| `crmsh` | SUSE:Linux Enterprise High Availability Extension 15 SP2 | All versions | 4.3.1+20210702.4e0ee8fb-5.59.1 |
| `crmsh` | SUSE:Linux Enterprise High Availability Extension 15 SP3 | All versions | 4.3.1+20210702.4e0ee8fb-5.59.1 |
| `crmsh` | openSUSE:Leap 15.1 | All versions | 4.2.0+git.1607075079.a25648d8-lp151.2.45.1 |
| `crmsh` | openSUSE:Leap 15.2 | All versions | 4.2.0+git.1607075079.a25648d8-lp152.4.39.1 |
| `crmsh` | openSUSE:Leap 15.2 | All versions | 4.3.1+20210702.4e0ee8fb-lp152.4.59.1 |
| `crmsh` | openSUSE:Leap 15.3 | All versions | 4.3.1+20210702.4e0ee8fb-5.59.1 |
| `crmsh` | openSUSE:Tumbleweed | All versions | 4.3.1+20210913.d7356663-1.2 |

Products: Clusterlabs Crmsh, Debian Debian Linux.

## How do I fix CVE-2020-35459?

Apply the vendor's patch.

## Is CVE-2020-35459 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-35459 and fix it if it is affected.

What it is: CVE-2020-35459 is a high-severity command injection vulnerability in Debian Debian Linux, published on 12 Jan 2021. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-35459 in the wild and no public exploit code.

Affected packages and fixed versions:
- crmsh (PyPI): affected all versions up to 4.2.1; no fix listed
- crmsh (PyPI): affected all versions up to 4.2.1; no fix listed
- crmsh (PyPI): affected all versions up to 4.2.1; no fix listed

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-2020-35459/ (Markdown: https://insights.sbomify.com/CVE-2020-35459/index.md)
```

## Sources

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

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