Trusted upstream forwarded headers are dropped when forwarded filter is disabled

オープン
#4,227 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

  • #4231 @hutiefang76 による — マージされずにクローズ

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
java, spring, spring-boot
領域
api, backend, security

調査の方向性

https://github.com/gbaso/spring-cloud-gateway-forwarded のサンプルプロジェクトを使用して、報告された Kubernetes トポロジーを再現し、影響を受けるバージョン間で動作を比較します。まず forwarded-header filter とその trust 設定を追跡します。このセットアップで信頼された upstream ヘッダーの処理が検証され、カバーされていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

for team discussion

Describe the bug

In version 2025.1.2 / 2025.0.3 a new filter was added to remove existing forwarded headers when the gateway does not have forwarding support enabled, or does not trust upstream proxies. However this broke my k8s setup:

  • an edge api gateway which adds forwarded headers
  • a second gateway, downstream from edge, which is used to route requests to different containers in the same pod
  • a container in the same pod as the internal gateway

In this setup the internal gateway does not add forwarded headers, as they would only refer to internal resources, and they are not relevant. It, however, trusts the upstream edge gateway.

In previous versions this worked as expected, but it broke with the last update.

Is this behavior intended (perhaps as part of CVE-2026-47825)? If so, what is the correct way to support use cases like mine?

Sample

https://github.com/gbaso/spring-cloud-gateway-forwarded

主要言語
Java
スター
4.9k
フォーク
3.5k
平均マージ
1日 13時間
マージ済み PR(30日)
14

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

spring-cloud/spring-cloud-gateway のほかの issue

spring-cloud/spring-cloud-gateway の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。