CVE-2026-5142: Foreman SSH Key Exposure via Authorization Bypass
Foreman, an infrastructure lifecycle management tool, contains an authorization flaw that allows authenticated users to access SSH private keys belonging to other organizations. Users with 'view_keypairs' permission can bypass organization-level scoping by directly requesting specific key pair IDs, exposing sensitive credentials across tenant boundaries. This is a multi-tenant isolation failure that affects deployments where multiple organizations share a Foreman instance.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 6.5 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- Weaknesses (CWE)
- CWE-639
- Affected products
- 4 configuration(s)
- Published / Modified
- 2026-07-01 / 2026-07-09
NVD description (verbatim)
A flaw was found in foreman. Authenticated users with 'view_keypairs' permission can bypass taxonomy scoping, allowing them to download private SSH (Secure Shell) keys from other organizations by directly querying key pair IDs. This vulnerability leads to cross-tenant data exposure in multi-tenant deployments, potentially compromising sensitive information.
6 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-5142 is an authorization bypass in Foreman stemming from insufficient taxonomy scoping validation. The vulnerability exists in the key pair retrieval mechanism, where the application fails to enforce organization boundaries when responding to direct key pair ID queries. An authenticated attacker with 'view_keypairs' permission can enumerate or directly access key pair resources belonging to other tenants, bypassing intended multi-tenant controls. The vulnerability is classified under CWE-639 (Authorization Bypass Through User-Controlled Key), indicating a fundamental flaw in how access control decisions reference tenant context.
Business impact
In multi-tenant Foreman deployments, this vulnerability creates a cross-tenant data exposure risk with severe confidentiality implications. Compromised SSH keys can be leveraged to gain unauthorized access to infrastructure managed by other organizations, potentially leading to lateral movement, data theft, or supply chain attacks. Organizations hosting multiple customers or business units on shared Foreman instances face exposure of their customers' or divisions' critical authentication material. The impact is amplified in environments where SSH key rotation is infrequent or where those keys control access to production systems.
Affected systems
The vulnerability affects Foreman and Red Hat Satellite (which includes Foreman as a component). Red Hat Enterprise Linux systems running affected Foreman or Satellite versions are in scope. Multi-tenant deployments are at greatest risk; single-tenant instances with limited user access may face reduced exposure depending on user permissions and key management practices.
Exploitability
Exploitation requires valid authentication and the 'view_keypairs' permission role—a relatively low barrier in environments where Foreman access is broadly distributed to operations or infrastructure teams. No user interaction is required; the attacker can directly query the Foreman API with key pair IDs to retrieve credentials. The attack is trivial to execute once credentials are obtained, making post-breach key enumeration a realistic threat. However, the attacker must first gain Foreman authentication, which is a prerequisite. The CVSS vector (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N) reflects network accessibility, low attack complexity, and high confidentiality impact constrained by the requirement for valid credentials.
Remediation
Apply Foreman patches that enforce proper taxonomy (organization) scoping in the key pair access control logic. Red Hat will release updates for Satellite and related RHEL packages; verify current patch availability through Red Hat's security advisories and errata. Until patches are available, restrict 'view_keypairs' permission to trusted administrators and implement network-level access controls to limit Foreman API exposure. Audit key pair access logs to identify unauthorized enumeration attempts. Consider rotating SSH keys that may have been exposed, particularly in multi-tenant environments.
Patch guidance
Monitor Red Hat Security Advisories (RHSA) for published fixes addressing CVE-2026-5142 in Foreman and Red Hat Satellite. Apply patches to all affected Foreman instances and Satellite servers as they become available. Test patches in a non-production environment first to ensure compatibility with custom integrations or workflows. After patching, verify that key pair access is properly scoped to the authenticated user's organization and that cross-tenant queries are rejected.
Detection guidance
Review Foreman audit logs and API request logs for evidence of key pair queries by users outside their assigned organization. Look for patterns of sequential key pair ID requests that may indicate enumeration. Monitor for API calls to '/api/v2/key_pairs/{id}' endpoints where the requesting user's organization does not match the target key pair's organization. If SIEM integration is in place, create alerts for unauthorized key pair access attempts. Query Foreman's database directly to identify which users have accessed which key pairs and cross-reference against organization assignments.
Why prioritize this
Although the CVSS score is MEDIUM (6.5), the vulnerability warrants prompt prioritization because it involves exposure of cryptographic credentials with operational impact. SSH keys directly enable infrastructure compromise, making this a critical data loss and access control issue despite the authentication prerequisite. Organizations with multi-tenant Foreman setups should treat this as HIGH priority. The lack of KEV designation suggests limited current exploitation, but the low complexity of the attack and high value of SSH keys make this an attractive target for opportunistic attackers with Foreman access.
Risk score, explained
The CVSS 3.1 score of 6.5 (MEDIUM) reflects: (1) network-accessible attack vector—the Foreman API is typically exposed over the network; (2) low attack complexity—direct key pair queries require no special conditions; (3) requirement for low-level privilege—'view_keypairs' permission is a basic role; (4) high confidentiality impact—SSH private keys are highly sensitive; (5) no integrity or availability impact—the attack is read-only. The score appropriately captures the authentication gate but may underrepresent risk in environments where SSH keys control critical infrastructure. Organizations should apply contextual risk scoring based on how many users hold 'view_keypairs' permission and the sensitivity of managed infrastructure.
Frequently asked questions
Can an unauthenticated attacker exploit this vulnerability?
No. The vulnerability requires a valid Foreman user account and the 'view_keypairs' permission role. Without authentication, the attacker cannot access the key pair API endpoints.
How do I know if my Foreman deployment is vulnerable?
If you are running Foreman or Red Hat Satellite and have not yet applied the security patch for CVE-2026-5142, your deployment is vulnerable. Multi-tenant deployments are at highest risk. Check your Foreman version against Red Hat's published advisories and patch status to determine if a fix is available for your version.
What should I do if I suspect SSH keys were compromised through this flaw?
Immediately revoke and rotate all SSH keys managed by the affected Foreman instance, prioritizing keys for production systems. Review Foreman audit logs to identify which keys were accessed by which users. If the attacker may have accessed keys outside their organization, notify affected teams to enable additional monitoring or regenerate their credentials.
Does this vulnerability affect single-tenant Foreman deployments?
Single-tenant deployments are technically vulnerable to the authorization bypass, but the risk is lower because there is only one organization's keys in the system. However, if multiple business units or teams use a single-tenant instance and rely on role-based access controls to separate key management, the vulnerability could still enable unauthorized access within that boundary.
This analysis is based on the published CVE-2026-5142 description and CVSS vector as of July 2026. Patch availability, vendor guidance, and affected product versions may change; refer to Red Hat's official security advisories for authoritative information. This document does not constitute security advice for any specific environment and should be validated against your organization's threat model and asset inventory. No exploit code or step-by-step attack instructions are provided. Source: NVD (public-domain), retrieved 2026-08-10. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-5135MEDIUMForeman Broken Access Control via Lookup Value Override Retargeting
- CVE-2026-5138MEDIUMForeman Cross-Tenant Information Disclosure via Authorization Bypass
- CVE-2026-14209MEDIUMKeycloak Admin UI Permission Bypass in Fine-Grained Access Control
- CVE-2026-14614MEDIUMKeycloak Admin Scope Injection via FGAP v2 Bypass
- CVE-2026-9799MEDIUMKeycloak UMA Authorization Bypass in Permissive Mode
- CVE-2026-9099HIGHKeycloak Group Reparenting Authorization Bypass – Privilege Escalation to Realm Takeover
- CVE-2026-13316MEDIUMForeman & Red Hat Satellite SSRF Cloud Metadata Vulnerability
- CVE-2026-9073MEDIUMForeman-mcp-server Sensitive Data Logging Vulnerability (CVSS 6.2)