CVE-2026-12112: Foreman-mcp-server: mcp server: active session hijacking via insecure session state reuse

Published Jun 11, 2026
·
Updated

A flaw was found in the foreman-mcp-server. A session management vulnerability in the MCP Server allows unauthenticated attackers to hijack active administrative sessions due to an improper cache of authenticated client connections, by trusting a non-secret session ID without re-validating authentication tokens and by logging all newly created session IDs to standard logs. This issue can result in privilege escalation and infrastructure-wide code execution.

Other sources

Description

A session management vulnerability in the MCP Server allows unauthenticated attackers to hijack active administrative sessions and execute actions on the Red Hat Satellite server.

The vulnerability stems from how the AuthMiddleware caches application state. Rather than caching response data, the server caches the fully authenticated ForemanApi client connection object in an in-memory dictionary (usermap), keyed by the non secret mcp-session-id. When processing subsequent requests, the middleware improperly treats the presence of this cached object as proof of current authentication failing to re-validate the foremantoken provided in the new request and blindly trusting any payload that includes an active session ID (mcp-session-id).

Because the server logs all newly created session IDs at the INFO level (F-32 MCP Server: Insecure Sensitive HTTP Header Sanitization), an attacker can harvest a legitimate user's ID from standard logs. Even though the foremantoken header is required, it’s not evaluated after initialization. Also, the MCP server never terminates the session. It will trust that leaked mcp-session-id forever, or until the server itself is restarted.

Impact

The attacker achieves arbitrary API invocation capabilities by proxying JSON-RPC requests through the hijacked ForemanApi client instance. Because this cached object automatically injects the victim's valid Bearer authentication token into outgoing HTTP requests, the backend Red Hat Satellite server evaluates all requests against the victim's Role-Based Access Control (RBAC) profile.

Successful exploitation leads to Privilege Escalation, granting an unauthenticated attacker the ability to execute Infrastructure-wide Remote Code Execution (RCE), if enabled.

Recommendations

Update AuthMiddleware to Implement Per-Request Token Validation. Every incoming request must validate the foremantoken, even if a session ID exists. The server must cryptographically verify the request header's token against the associated session's token. Mismatched tokens must result in a 401 Unauthorized rejection, and the session should be invalidated to prevent hijacking. This aligns with MCP security best practices, which mandate that authorization-implementing servers MUST verify all requests and MUST NOT use sessions for authentication.

Red Hat

Affected Software

3 affected components
Foreman Foreman MCP Server
redhat Satellite=6.19
theforeman foreman

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Update AuthMiddleware so that every incoming request validates the foreman_token even if an mcp-session-id exists. If the token does not match the session’s associated token, reject the request with 401 Unauthorized and invalidate the session to prevent session hijacking.

    foreman-mcp-server (AuthMiddleware / session management) Per-request foreman_token validation = Enforce re-validation of foreman_token on every incoming request (not only at initialization); require cryptographic verification of request header token against the associated session's token for the provided mcp-session-id
  2. Configuration

    Modify MCP server session handling so sessions are terminated (or invalidated) rather than being trusted forever; leaked mcp-session-id must not be valid indefinitely (e.g., do not allow continued use until the server restart).

    foreman-mcp-server (session lifecycle) Session termination = Terminate/expire sessions rather than allowing them to persist indefinitely
  3. Configuration

    Remove/disable INFO-level logging of newly created session IDs (as indicated by 'F-32 MCP Server: Insecure Sensitive HTTP Header Sanitization') so attackers cannot harvest legitimate user's IDs from standard logs.

    foreman-mcp-server (logging) INFO-level logging of newly created session IDs = Do not log newly created mcp-session-id values at INFO level
  4. Compensating control

    Apply network access controls so unauthenticated attackers cannot reach foreman-mcp-server’s MCP endpoint (e.g., restrict inbound access to trusted sources/management networks via firewall/ACL) while the middleware/session fixes are deployed.

Event History

Jun 11, 2026
Data Sourced
via Red Hat·08:32 PM
DescriptionSeverityAffected Software
Jun 23, 2026
CVE Published
via MITRE·07:40 PM
Data Sourced
via MITRE·07:40 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:16 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-12112?

CVE-2026-12112 has a high severity rating of 7.8.

2

How do I fix CVE-2026-12112?

To fix CVE-2026-12112, ensure that session IDs are re-validated and that secure session management practices are implemented.

3

What type of vulnerability is CVE-2026-12112?

CVE-2026-12112 is a session management vulnerability that allows session hijacking.

4

What software is affected by CVE-2026-12112?

CVE-2026-12112 affects the Foreman foreman-mcp-server software.

5

Who can exploit CVE-2026-12112?

CVE-2026-12112 can be exploited by unauthenticated attackers who can hijack active administrative sessions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203