# CVE-2020-35458: Command injection in n/a

> Unauthenticated remote attackers can execute arbitrary code as hauser via Ruby shell code injection in the login_from_cookie parameter.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 Jan 2021
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-mjxr-7f24-c564, SUSE-SU-2021:0088-1, SUSE-SU-2021:0089-1, SUSE-SU-2021:0090-1, SUSE-SU-2021:0192-1, SUSE-SU-2021:0198-1, SUSE-SU-2021:0200-1, openSUSE-SU-2021:0054-1, openSUSE-SU-2021:0074-1, openSUSE-SU-2021:0144-1, openSUSE-SU-2021:0147-1

## What is CVE-2020-35458?

CVE-2020-35458 is a critical command injection vulnerability in n/a, published on 12 Jan 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

An issue was discovered in ClusterLabs Hawk 2.x through 2.3.0-x. There is a Ruby shell code injection issue via the hawk_remember_me_id parameter in the login_from_cookie cookie. The user logout routine could be used by unauthenticated remote attackers to execute code as hauser.

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

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

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `hawk2` | SUSE:Linux Enterprise High Availability Extension 12 SP3 | All versions | 2.4.0+git.1607523195.05cd3222-2.33.1 |
| `hawk2` | SUSE:Linux Enterprise High Availability Extension 12 SP3 | All versions | 2.5.0+git.1611141696.64c61e0c-2.36.1 |
| `hawk2` | SUSE:Linux Enterprise High Availability Extension 12 SP4 | All versions | 2.4.0+git.1607523195.05cd3222-3.21.1 |
| `hawk2` | SUSE:Linux Enterprise High Availability Extension 12 SP4 | All versions | 2.5.0+git.1611141696.64c61e0c-3.24.1 |
| `hawk2` | SUSE:Linux Enterprise High Availability Extension 12 SP5 | All versions | 2.4.0+git.1607523195.05cd3222-3.21.1 |
| `hawk2` | SUSE:Linux Enterprise High Availability Extension 12 SP5 | All versions | 2.5.0+git.1611141696.64c61e0c-3.24.1 |
| `hawk2` | SUSE:Linux Enterprise High Availability Extension 15 | All versions | 2.3.0+git.1603969748.10468582-3.18.1 |
| `hawk2` | SUSE:Linux Enterprise High Availability Extension 15 | All versions | 2.4.0+git.1611141202.2fe6369e-3.21.1 |
| `hawk2` | SUSE:Linux Enterprise High Availability Extension 15 SP1 | All versions | 2.3.0+git.1603969748.10468582-3.18.1 |
| `hawk2` | SUSE:Linux Enterprise High Availability Extension 15 SP1 | All versions | 2.4.0+git.1611141202.2fe6369e-3.21.1 |
| `hawk2` | SUSE:Linux Enterprise High Availability Extension 15 SP2 | All versions | 2.3.0+git.1603969748.10468582-3.18.1 |
| `hawk2` | SUSE:Linux Enterprise High Availability Extension 15 SP2 | All versions | 2.4.0+git.1611141202.2fe6369e-3.21.1 |
| `hawk2` | openSUSE:Leap 15.1 | All versions | 2.3.0+git.1603969748.10468582-lp151.2.18.1 |
| `hawk2` | openSUSE:Leap 15.1 | All versions | 2.4.0+git.1611141202.2fe6369e-lp151.2.21.1 |
| `hawk2` | openSUSE:Leap 15.2 | All versions | 2.3.0+git.1603969748.10468582-lp152.2.9.1 |
| `hawk2` | openSUSE:Leap 15.2 | All versions | 2.4.0+git.1611141202.2fe6369e-lp152.2.12.1 |

Products: Clusterlabs Hawk.

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

Apply the vendor's patch.

## Is CVE-2020-35458 being exploited?

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

## Other vulnerabilities in n/a

- [CVE-2021-3020](https://insights.sbomify.com/CVE-2021-3020/): Privilege escalation in n/a (high 8.8)

## Fix prompt for AI coding agents

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

What it is: CVE-2020-35458 is a critical command injection vulnerability in n/a, published on 12 Jan 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-35458 in the wild and no public exploit code.

Affected product: n/a. No package-level version data is available, so check the vendor advisory linked from the reference page.

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

## Sources

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

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