--- a/examples/Cargo.toml
+++ b/examples/Cargo.toml
@@ -318,7 +318,7 @@
 tokio-rustls = { version = "0.26", optional = true, features = ["ring", "tls12"], default-features = false }
 hyper-rustls = { version = "0.27.0", features = ["http2", "ring", "tls12"], optional = true, default-features = false }
 rustls-pemfile = { version = "2.0.0", optional = true }
-tower-http = { version = "0.5", optional = true }
+tower-http = { version = ">= 0.5, <= 0.6", optional = true }
 pin-project = { version = "1.0.11", optional = true }
 
 [build-dependencies]
--- a/tests/compression/Cargo.toml
+++ b/tests/compression/Cargo.toml
@@ -20,7 +20,7 @@
 tokio-stream = "0.1"
 tonic = {path = "../../tonic", features = ["gzip", "zstd"]}
 tower = {version = "0.4", features = []}
-tower-http = {version = "0.5", features = ["map-response-body", "map-request-body"]}
+tower-http = {version = ">= 0.5, <= 0.6", features = ["map-response-body", "map-request-body"]}
 
 [build-dependencies]
 tonic-build = {path = "../../tonic-build" }
--- a/tests/integration_tests/Cargo.toml
+++ b/tests/integration_tests/Cargo.toml
@@ -22,7 +22,7 @@
 hyper-util = "0.1"
 tokio-stream = {version = "0.1.5", features = ["net"]}
 tower = {version = "0.4", features = []}
-tower-http = { version = "0.5", features = ["set-header", "trace"] }
+tower-http = { version = ">= 0.5, <= 0.6", features = ["set-header", "trace"] }
 tower-service = "0.3"
 tracing = "0.1"
 
--- a/tonic-web/Cargo.toml
+++ b/tonic-web/Cargo.toml
@@ -25,7 +25,7 @@
 tonic = { version = "0.12", path = "../tonic", default-features = false }
 tower-service = "0.3"
 tower-layer = "0.3"
-tower-http = { version = "0.5", features = ["cors"] }
+tower-http = { version = ">= 0.5, <= 0.6", features = ["cors"] }
 tracing = "0.1"
 
 [dev-dependencies]
