CVE-2026-9073: Foreman-mcp-server: mcp server: insecure sensitive http header sanitization

Published May 20, 2026
·
Updated

A flaw was found in foreman-mcp-server. This component utilizes two distinct logging mechanisms that can expose sensitive session and authentication data. One mechanism logs session identifiers, which are treated as authentication credentials, at an informational level. The other, when debug logging is enabled, incompletely sanitizes HTTP request headers, leading to the cleartext logging of sensitive information such as authorization tokens and API keys. This vulnerability can result in a confidentiality breach, as sensitive authentication data is persisted in plain text within container logs, increasing the risk if logs are forwarded to a centralized platform.

Other sources

Description The foreman-mcp-server contains two distinct logging mechanisms that expose sensitive session and authentication data.

Exposure occurs across two tiers:

Diagnostic Over-logging (INFO Level): The server relies on the MCP Python SDK (Upstream: modelcontextprotocol/python-sdk). By default, this library logs the creation of new transports and their associated mcp-session-id at the INFO level. While this is standard diagnostic behavior for the SDK, the foreman-mcp-server implementation fails to suppress or filter these logs. Because the server improperly treats the session ID as an authentication credential (as proven in F-34 MCP Server: Active Session Hijacking via Insecure Session State Reuse), this default behavior results in the leakage of session secrets in standard, non-debug application logs.

Incomplete Sanitization Logic (DEBUG Level): The LoggingMiddleware (src/foremanmcpserver/middleware/logging.py) records the full HTTP request header dictionary when the log level is set to DEBUG. This middleware utilizes a negative security model (block-list) that only masks four hardcoded keys: foremanpassword, foremantoken, password, and token. Any header not explicitly on this list, such as Authorization, Cookie, or X-Satellite-Secret, is logged in cleartext.

IMPACT

Confidentiality Breach: Sensitive Bearer tokens, Session IDs, and API keys are persisted in plain text within the container logs.

Log Aggregation Risk: If logs are forwarded to a centralized platform (e.g., ELK, Splunk, CloudWatch), the secrets become searchable and accessible to a wider pool of users (developers, auditors, SREs) who may not have authorization to the Foreman API itself.

Non-Compliance: This behavior directly violates global security standards that prohibit the storage of sensitive authentication data in audit logs.

RECOMMENDATIONS

Address Diagnostic Verbosity (Dependency Fix): Configure the application's logging dictionary to set the mcp.server logger to WARNING or higher. This will suppress the default INFO level transport creation logs from the SDK.

Adopt an Allow-list (Positive Security Model): Re-engineer sanitizeheaders to mask all header values by default. Only allow-list known non-sensitive headers (e.g., host, user-agent, accept, content-type).

REFERENCES

CWE-532: Insertion of Sensitive Information into Log File

OWASP Logging Cheat Sheet

https://github.com/modelcontextprotocol/python-sdk

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

    Configure the application's logging dictionary so the mcp.server logger is set to WARNING or higher to suppress INFO-level transport/session-id logs and reduce sensitive data leakage.

    foreman-mcp-server (LoggingMiddleware) log level for mcp.server logger = WARNING or higher
  2. Configuration

    Re-engineer _sanitize_headers to mask all header values by default; only log non-sensitive headers from an allow-list (e.g., host, user-agent, accept, content-type). Do not log sensitive headers such as Authorization, Cookie, or X-Satellite-Secret in cleartext.

    foreman-mcp-server (_sanitize_headers) header sanitization logic = mask all header values by default (allow-list only)

Event History

May 20, 2026
Data Sourced
via Red Hat·12:10 PM
DescriptionSeverityAffected Software
Jun 23, 2026
CVE Published
via MITRE·07:53 PM
Data Sourced
via MITRE·07:53 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:17 PM
DescriptionSeverityWeaknessAffected Software
Jul 4, 58550
Event
via FIRST·02:07 AM

Frequently Asked Questions

1

What is the severity of CVE-2026-9073?

The severity of CVE-2026-9073 is medium with a score of 6.2.

2

How do I fix CVE-2026-9073?

To fix CVE-2026-9073, ensure that sensitive data is not logged at the informational level and review your logging configurations.

3

What systems are affected by CVE-2026-9073?

CVE-2026-9073 affects the Foreman component known as foreman-mcp-server.

4

What kind of data is exposed due to CVE-2026-9073?

CVE-2026-9073 can expose sensitive session and authentication data, including session identifiers.

5

Which logging mechanisms are involved in CVE-2026-9073?

CVE-2026-9073 involves two distinct logging mechanisms that log sensitive data inappropriately.

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