Skip to content

[Release-4.22] OCPBUGS-87167: Strip X-SSL-* headers for plain HTTP#793

Open
MrSanketkumar wants to merge 1 commit into
openshift:release-4.22from
MrSanketkumar:OCPBUGS-87167-cve-2026-46579-4.22
Open

[Release-4.22] OCPBUGS-87167: Strip X-SSL-* headers for plain HTTP#793
MrSanketkumar wants to merge 1 commit into
openshift:release-4.22from
MrSanketkumar:OCPBUGS-87167-cve-2026-46579-4.22

Conversation

@MrSanketkumar

@MrSanketkumar MrSanketkumar commented Jun 10, 2026

Copy link
Copy Markdown

Vulnerability: CVE-2026-46579 - mTLS client certificate spoofing via HTTP header injection

Fix: Prevents unauthenticated spoofing of mutual TLS client identities by stripping X-SSL-Client-* headers from HTTP requests before they reach backends.

Changes:

  • Adds `ROUTER_MUTUAL_TLS_HEADER_FILTER` environment variable (default: `true`)
  • Strips all 12 X-SSL headers in HTTP frontends: `public`, `fe_sni`, `fe_no_sni`
  • Secure by default - header stripping enabled unless explicitly disabled

Cherry-picked from: d180c82

Summary by CodeRabbit

  • Bug Fixes
    • Added security filtering for inbound TLS identity headers across HTTP and HTTPS traffic flows. This prevents potential header spoofing and is enabled by default, with an option to disable via the ROUTER_MUTUAL_TLS_HEADER_FILTER environment variable if needed.

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Jun 10, 2026
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Walkthrough

This PR adds security-focused mutual-TLS header filtering to the HAProxy router configuration. The change conditionally strips inbound X-SSL and related identity headers across all three HTTP and HTTPS frontends to prevent client-side header spoofing, controlled by the ROUTER_MUTUAL_TLS_HEADER_FILTER environment variable (enabled by default).

Changes

Mutual-TLS Header Spoofing Prevention

Layer / File(s) Summary
Conditional header deletion across HTTP and HTTPS frontends
images/router/haproxy/conf/haproxy-config.template
Plain HTTP frontend public, TLS SNI (frontend fe_sni), and TLS no-SNI (frontend fe_no_sni) frontends each gain conditional http-request del-header directives that strip X-SSL-* and X-SSL-Issuer headers when ROUTER_MUTUAL_TLS_HEADER_FILTER is enabled (default), preventing client-side header spoofing before routing logic executes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • openshift/router#787: Both PRs modify images/router/haproxy/conf/haproxy-config.template to conditionally http-request del-header mutual-TLS spoofing headers (X-SSL/X-SSL-Client-* and X-SSL-Issuer) in the same HAProxy frontends (public, fe_sni, fe_no_sni) under ROUTER_MUTUAL_TLS_HEADER_FILTER.

Suggested reviewers

  • frobware
🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed This repository does not use Ginkgo testing framework. All test files use Go's standard testing.T framework. The check is not applicable to this codebase.
Test Structure And Quality ✅ Passed The PR modifies the HAProxy template file to add header stripping logic; no Ginkgo tests exist in the codebase, making the check not applicable.
Microshift Test Compatibility ✅ Passed No Ginkgo e2e tests were added. All new test files use standard Go testing framework (func Test*). MicroShift compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No Ginkgo e2e tests added. All 31 test files are standard Go unit tests with zero Ginkgo imports. PR modifies HAProxy config for CVE-2026-46579, not tests.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only HAProxy config template to strip X-SSL headers. No Kubernetes deployment manifests, controllers, or pod scheduling constraints were modified.
Ote Binary Stdout Contract ✅ Passed This is the OpenShift router production binary, not an OTE test binary. The OTE Binary Stdout Contract check is not applicable to production routers.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR does not add any Ginkgo e2e tests. It only modifies the HAProxy config template file. The custom check is not applicable.
No-Weak-Crypto ✅ Passed PR only modifies HAProxy configuration template to add HTTP header deletion rules; no weak cryptography, custom crypto implementations, or secret comparisons introduced.
Container-Privileges ✅ Passed PR modifies HAProxy config for security hardening; deploy/router.yaml only adds hostNetwork: true (standard requirement). No privileged containers, SYS_ADMIN, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed PR adds header deletion (not logging) to prevent mTLS spoofing. No new logging statements expose sensitive X-SSL-Client-* headers; headers deleted via http-request rules before capture/logging.
Title check ✅ Passed The title clearly describes the main change: stripping X-SSL-* headers for plain HTTP as part of a security fix for CVE-2026-46579, and correctly identifies the release branch target.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Jun 10, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@MrSanketkumar: This pull request references Jira Issue OCPBUGS-87167, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected dependent Jira Issue OCPBUGS-87205 to be in one of the following states: MODIFIED, ON_QA, VERIFIED, but it is Closed (Done) instead
  • expected dependent Jira Issue OCPBUGS-87205 to target a version in 5.0.0, but it targets "5.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Vulnerability: CVE-2026-46579 - mTLS client certificate spoofing via HTTP header injection

Fix: Prevents unauthenticated spoofing of mutual TLS client identities by stripping X-SSL-Client-* headers from HTTP requests before they reach backends.

Changes:

  • Adds `ROUTER_MUTUAL_TLS_HEADER_FILTER` environment variable (default: `true`)
  • Strips all 12 X-SSL headers in HTTP frontends: `public`, `fe_sni`, `fe_no_sni`
  • Secure by default - header stripping enabled unless explicitly disabled

Cherry-picked from: d180c82

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested review from gcs278 and ironcladlou June 10, 2026 07:40
@openshift-ci

openshift-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jcmoraisjr for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@MrSanketkumar

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@MrSanketkumar MrSanketkumar changed the title [Release-4.22] OCPBUGS-87167: Strip X-SSL-Client-* headers for plain HTTP [Release-4.22] OCPBUGS-87167: Strip X-SSL-* headers for plain HTTP Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants