# CVE-2021-42550: RCE from attacker with configuration edit priviledges through JNDI lookup

> An attacker with configuration edit privileges can execute arbitrary code via malicious JNDI lookups in Logback.

- **Severity:** Medium 6.6 (`CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Dec 2021
- **Updated:** 4 Aug 2024
- **Also known as:** DEBIAN-CVE-2021-42550, GHSA-668q-qrv7-99fm, OESA-2021-1476, OESA-2022-1946, ROOT-APP-MAVEN-CVE-2021-42550, SUSE-SU-2023:2097-1, UBUNTU-CVE-2021-42550, openSUSE-SU-2024:12026-1, openSUSE-SU-2024:12224-1

## What is CVE-2021-42550?

CVE-2021-42550 is a medium-severity code injection vulnerability in Redhat Satellite, published on 16 Dec 2021. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

In logback version 1.2.7 and prior versions, an attacker with the required privileges to edit configurations files could craft a malicious configuration allowing to execute arbitrary code loaded from LDAP servers.

Weakness: CWE-502 (Deserialization of Untrusted Data)

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

2 open source packages ship an affected version, including ch.qos.logback:logback-core. It affects 6 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ch.qos.logback:logback-core` | Maven | All versions | 1.2.9 |
| `ch.qos.logback:logback-core` | Maven | All versions | 1.2.9 |
| `maven` | SUSE:Enterprise Storage 7 | All versions | 3.8.6-150200.4.9.8 |
| `minlog` | SUSE:Enterprise Storage 7 | All versions | 1.3.1-150200.3.7.8 |
| `xmvn` | SUSE:Enterprise Storage 7 | All versions | 4.0.0-150200.3.7.1 |
| `xmvn-connector` | SUSE:Enterprise Storage 7 | All versions | 4.0.0-150200.3.7.3 |
| `xmvn-mojo` | SUSE:Enterprise Storage 7 | All versions | 4.0.0-150200.3.7.8 |
| `xmvn-tools` | SUSE:Enterprise Storage 7 | All versions | 4.0.0-150200.3.7.1 |
| `maven` | SUSE:Enterprise Storage 7.1 | All versions | 3.8.6-150200.4.9.8 |
| `minlog` | SUSE:Enterprise Storage 7.1 | All versions | 1.3.1-150200.3.7.8 |
| `xmvn` | SUSE:Enterprise Storage 7.1 | All versions | 4.0.0-150200.3.7.1 |
| `xmvn-connector` | SUSE:Enterprise Storage 7.1 | All versions | 4.0.0-150200.3.7.3 |
| `xmvn-mojo` | SUSE:Enterprise Storage 7.1 | All versions | 4.0.0-150200.3.7.8 |
| `xmvn-tools` | SUSE:Enterprise Storage 7.1 | All versions | 4.0.0-150200.3.7.1 |
| `maven` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 3.8.6-150200.4.9.8 |
| `minlog` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 1.3.1-150200.3.7.8 |
| `xmvn` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 4.0.0-150200.3.7.1 |
| `xmvn-connector` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 4.0.0-150200.3.7.3 |
| `xmvn-mojo` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 4.0.0-150200.3.7.8 |
| `xmvn-tools` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 4.0.0-150200.3.7.1 |
| `maven` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 3.8.6-150200.4.9.8 |
| `minlog` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 1.3.1-150200.3.7.8 |
| `xmvn` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 4.0.0-150200.3.7.1 |
| `xmvn-connector` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 4.0.0-150200.3.7.3 |
| `xmvn-mojo` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 4.0.0-150200.3.7.8 |
| `xmvn-tools` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 4.0.0-150200.3.7.1 |
| `maven` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 3.8.6-150200.4.9.8 |
| `minlog` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 1.3.1-150200.3.7.8 |
| `xmvn` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 4.0.0-150200.3.7.1 |
| `xmvn-connector` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 4.0.0-150200.3.7.3 |
| `xmvn-mojo` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 4.0.0-150200.3.7.8 |
| `xmvn-tools` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 4.0.0-150200.3.7.1 |
| `maven` | SUSE:Linux Enterprise Module for Development Tools 15 SP4 | All versions | 3.8.6-150200.4.9.8 |
| `minlog` | SUSE:Linux Enterprise Module for Development Tools 15 SP4 | All versions | 1.3.1-150200.3.7.8 |
| `xmvn` | SUSE:Linux Enterprise Module for Development Tools 15 SP4 | All versions | 4.0.0-150200.3.7.1 |
| `xmvn-connector` | SUSE:Linux Enterprise Module for Development Tools 15 SP4 | All versions | 4.0.0-150200.3.7.3 |
| `xmvn-mojo` | SUSE:Linux Enterprise Module for Development Tools 15 SP4 | All versions | 4.0.0-150200.3.7.8 |
| `xmvn-tools` | SUSE:Linux Enterprise Module for Development Tools 15 SP4 | All versions | 4.0.0-150200.3.7.1 |
| `maven` | SUSE:Linux Enterprise Real Time 15 SP3 | All versions | 3.8.6-150200.4.9.8 |
| `minlog` | SUSE:Linux Enterprise Real Time 15 SP3 | All versions | 1.3.1-150200.3.7.8 |

Products: Netapp Cloud Manager, Netapp Service Level Manager, Netapp Snap Creator Framework, Qos Logback, Redhat Satellite, Siemens Sinec Nms.

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

Upgrade ch.qos.logback:logback-core to 1.2.9 or later.

## Is CVE-2021-42550 being exploited?

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

## Other vulnerabilities in Redhat Satellite

- [CVE-2021-26990](https://insights.sbomify.com/CVE-2021-26990/): Missing authorization in Cloud Manager (critical 9.1)
- [CVE-2021-27002](https://insights.sbomify.com/CVE-2021-27002/): Information disclosure in Cloud Manager (high 7.5)
- [CVE-2021-26991](https://insights.sbomify.com/CVE-2021-26991/): Security feature bypass in Cloud Manager (high 7.5)
- [CVE-2021-26992](https://insights.sbomify.com/CVE-2021-26992/): Denial of service in Cloud Manager (high 7.5)
- [CVE-2021-26998](https://insights.sbomify.com/CVE-2021-26998/): Information disclosure in NetApp Cloud Manager (medium 4.3)

## Fix prompt for AI coding agents

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

What it is: CVE-2021-42550 is a medium-severity code injection vulnerability in Redhat Satellite, published on 16 Dec 2021. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2021-42550 in the wild and no public exploit code.

Affected packages and fixed versions:
- ch.qos.logback:logback-core (Maven): affected all versions; fixed in 1.2.9
- ch.qos.logback:logback-core (Maven): affected all versions; fixed in 1.2.9

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

## Sources

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

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