# CVE-2024-4871: Foreman: host ssh key not being checked in remote execution

> Attackers can perform man-in-the-middle attacks during remote execution because SSH host key checking is disabled, potentially leaking secrets.

- **Severity:** Medium 6.8 (`CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 May 2024
- **Updated:** 25 Feb 2026
- **Also known as:** GHSA-q5x2-4347-hrg2, RHBA-2024:4589

## What is CVE-2024-4871?

CVE-2024-4871 is a medium-severity vulnerability in Red Hat Satellite 6.15 for RHEL 8, published on 14 May 2024. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

A vulnerability was found in Satellite. When running a remote execution job on a host, the host's SSH key is not being checked. When the key changes, the Satellite still connects it because it uses "-o StrictHostKeyChecking=no". This flaw can lead to a man-in-the-middle attack (MITM), denial of service, leaking of secrets the remote execution job contains, or other issues that may arise from the attacker's ability to forge an SSH key. This issue does not directly allow unauthorized remote execution on the Satellite, although it can leak secrets that may lead to it.

Weakness: CWE-322 (Key Exchange without Entity Authentication)

## Which versions are affected by CVE-2024-4871?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `candlepin` | Red Hat:satellite:6.15::el8 | All versions | 0:4.3.14-1.el8sat |
| `candlepin-selinux` | Red Hat:satellite:6.15::el8 | All versions | 0:4.3.14-1.el8sat |
| `foreman` | Red Hat:satellite:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `foreman-cli` | Red Hat:satellite:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `foreman-debug` | Red Hat:satellite:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `foreman-dynflow-sidekiq` | Red Hat:satellite:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `foreman-ec2` | Red Hat:satellite:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `foreman-installer` | Red Hat:satellite:6.15::el8 | All versions | 1:3.9.3.2-1.el8sat |
| `foreman-installer-katello` | Red Hat:satellite:6.15::el8 | All versions | 1:3.9.3.2-1.el8sat |
| `foreman-journald` | Red Hat:satellite:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `foreman-libvirt` | Red Hat:satellite:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `foreman-openstack` | Red Hat:satellite:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `foreman-ovirt` | Red Hat:satellite:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `foreman-pcp` | Red Hat:satellite:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `foreman-postgresql` | Red Hat:satellite:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `foreman-redis` | Red Hat:satellite:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `foreman-service` | Red Hat:satellite:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `foreman-telemetry` | Red Hat:satellite:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `foreman-vmware` | Red Hat:satellite:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `python-pulp-container` | Red Hat:satellite:6.15::el8 | All versions | 0:2.16.9-1.el8pc |
| `python-pulpcore` | Red Hat:satellite:6.15::el8 | All versions | 0:3.39.15-1.el8pc |
| `python3.11-pulp-container` | Red Hat:satellite:6.15::el8 | All versions | 0:2.16.9-1.el8pc |
| `python3.11-pulpcore` | Red Hat:satellite:6.15::el8 | All versions | 0:3.39.15-1.el8pc |
| `rubygem-dynflow` | Red Hat:satellite:6.15::el8 | All versions | 0:1.8.3-1.el8sat |
| `rubygem-foreman_ansible` | Red Hat:satellite:6.15::el8 | All versions | 0:13.0.6-1.el8sat |
| `rubygem-foreman_remote_execution` | Red Hat:satellite:6.15::el8 | All versions | 0:12.0.7-1.el8sat |
| `rubygem-foreman_remote_execution-cockpit` | Red Hat:satellite:6.15::el8 | All versions | 0:12.0.7-1.el8sat |
| `rubygem-katello` | Red Hat:satellite:6.15::el8 | All versions | 0:4.11.0.15-1.el8sat |
| `rubygem-smart_proxy_container_gateway` | Red Hat:satellite:6.15::el8 | All versions | 0:3.0.0-1.el8sat |
| `rubygem-smart_proxy_remote_execution_ssh` | Red Hat:satellite:6.15::el8 | All versions | 0:0.10.6-1.el8sat |
| `satellite` | Red Hat:satellite:6.15::el8 | All versions | 0:6.15.2-1.el8sat |
| `satellite-cli` | Red Hat:satellite:6.15::el8 | All versions | 0:6.15.2-1.el8sat |
| `satellite-common` | Red Hat:satellite:6.15::el8 | All versions | 0:6.15.2-1.el8sat |
| `foreman` | Red Hat:satellite_capsule:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `foreman-debug` | Red Hat:satellite_capsule:6.15::el8 | All versions | 0:3.9.1.8-1.el8sat |
| `foreman-installer` | Red Hat:satellite_capsule:6.15::el8 | All versions | 1:3.9.3.2-1.el8sat |
| `foreman-installer-katello` | Red Hat:satellite_capsule:6.15::el8 | All versions | 1:3.9.3.2-1.el8sat |
| `python-pulp-container` | Red Hat:satellite_capsule:6.15::el8 | All versions | 0:2.16.9-1.el8pc |
| `python-pulpcore` | Red Hat:satellite_capsule:6.15::el8 | All versions | 0:3.39.15-1.el8pc |
| `python3.11-pulp-container` | Red Hat:satellite_capsule:6.15::el8 | All versions | 0:2.16.9-1.el8pc |

## How do I fix CVE-2024-4871?

Apply the vendor's patch.

## Is CVE-2024-4871 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-4871 and fix it if it is affected.

What it is: CVE-2024-4871 is a medium-severity vulnerability in Red Hat Satellite 6.15 for RHEL 8, published on 14 May 2024. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-4871 in the wild and no public exploit code.

Affected product: Red Hat Satellite 6.15 for RHEL 8. 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-2024-4871/ (Markdown: https://insights.sbomify.com/CVE-2024-4871/index.md)
```

## Sources

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

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