Pingora HTTP/1の上流転送で認証回避のおそれ
Summary
攻撃者がConnectionヘッダーで指定したヘッダーが、Pingoraの上流転送時に除去されず、後段のHTTP/1中間装置で削除されるおそれがあります。その結果、X-Forwarded-ForなどによるIP制限を回避される可能性があります。影響を受けるのはバージョン0.9.0より前のpingora-proxyで、0.9.0以降へのアップデートが必要です。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
攻撃者がConnectionヘッダーで指定したヘッダーが、Pingoraの上流転送時に除去されず、後段のHTTP/1中間装置で削除されるおそれがあります。その結果、X-Forwarded-ForなどによるIP制限を回避される可能性があります。影響を受けるのはバージョン0.9.0より前のpingora-proxyで、0.9.0以降へのアップデートが必要です。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| Cloudflarehttps://github.com/cloudflare/pingora |
≥ 0.1.0, < 0.9.0→ 0.9.0 |
0.9.0 |
| crates.iopingora-proxy |
≥ 0.0.0-0, < 0.9.0→ 0.9.0 |
0.9.0 |
Original description The description as published by the source.
Summary
Before version 0.9.0, the HTTP/1 upstream path in pingora-proxy passed the downstream request through upstream_request_filter and wrote it to the upstream without removing the client's Connection header, other hop-by-hop headers, or the headers Connection nominated, although RFC 9110 Section 7.6.1 requires intermediaries to remove them. The HTTP/2 upstream path already removed Connection and related HTTP/1-specific headers. A client could therefore nominate a header that the application adds in upstream_request_filter (for example, Connection: keep-alive, X-Forwarded-For). A downstream HTTP/1 intermediary that honors Connection would then strip the Pingora-added header before it reached the origin.
Impact
Specifically affects chained deployments where an HTTP/1 intermediary between Pingora and the origin processes Connection nominations (for example, Go's net/http/httputil.ReverseProxy) and the origin trusts headers added by that intermediary (for example, X-Forwarded-For for IP-based authorization). A remote, unauthenticated attacker can have those headers removed, potentially bypassing authorization. The reporter demonstrated access to an IP-restricted endpoint using X-Forwarded-For for IP validation on the origin. This is the same class of issue as CVE-2022-31813 in Apache HTTP Server.
Note that Cloudflare CDN customers were unaffected, as no such chained deployment as described above exists with internal Pingora services, and Connection headers are sanitized b…
Source: NIST National Vulnerability Database NVD GitHub Advisory
References
- advisory nvd.nist.gov
- advisory github.com
- advisory rustsec.org
- package github.com
- package crates.io
- web github.com
- web github.com
- web github.com