GHSA-p4cp-vhp5-73wj: 
Rust Análisis y mitigación de vulnerabilidades

With the default http2 feature, HttpServer::bind() / listen() serve plaintext connections through tcp_auto_h2c(), which awaits io.peek() to pick HTTP/1 or HTTP/2 (actix-http/src/service.rs#L231-L261). That peek has no deadline, and the client request timeout (5 seconds by default) only starts once the H1 dispatcher exists. A peer that connects and sends nothing is never closed.

Reach

Any client that can open TCP connections to a plaintext listener. Auto-h2c has been the default for plaintext binds since 4.19.0 (#4400). TLS listeners, .auto_h2c(false), builds without http2, and services behind an L7 proxy that waits for a full request before connecting upstream don't hit this path. This is separate from GHSA-54pm-2wm5-hpmg, which is about a partial second request inside the dispatcher. This happens before any dispatcher is built.

Reproduction

I used a stock app (HttpServer::new(|| App::new().service(greet)).bind("127.0.0.1:...")?.run()) built from source at 0581ada (actix-web 4.20.0 / actix-http 3.22.0) and again at current main (12df9de), with the server's soft fd limit at 1,024. The client opened 1,100 connections that send nothing, waited 10 seconds, then sent one normal request on a new connection.

CaseSilent sockets after 10 s408 sentNormal request
Default (auto-h2c on)1,100 still open0no response (timed out)
.auto_h2c(false) control01,100HTTP 200
Default with the patch below0 (all closed)0HTTP 200
Same results on both commits.

Fix

The patch below bounds the peek with client_request_deadline() and closes the connection when it expires. A zero (disabled) client request timeout keeps the current unbounded behavior. With the patch, cargo test -p actix-http and cargo test -p actix-web pass. One behavior change: a silent connection is closed without a 408 response, since nothing has been parsed yet. I can share the local harnesses as regression tests if useful. Reported by Dickson Wu (SEAL & CertiK).

Patch: Bound auto-h2c detection by the client request timeout

From 53e165797c01d5e4c636cd3bf01c5b2e051071f5 Mon Sep 17 00:00:00 2001
From: Dickson Wu <33645481+DicksonWu654@users.noreply.github.com>
Date: Tue, 24 Nov 2026 13:06:56 +0000
Subject: [PATCH] Bound auto-h2c detection by request timeout
Close silent plaintext connections when the configured client request timeout expires. Preserve unlimited peeking when the timeout is disabled.
---
 actix-http/src/service.rs | 53 ++++++++++++++++++++++++---------------
 1 file changed, 33 insertions(+), 20 deletions(-)
diff --git a/actix-http/src/service.rs b/actix-http/src/service.rs
index d91a8c72..e54a2123 100644
--- a/actix-http/src/service.rs
+++ b/actix-http/src/service.rs
@@ -15,6 +15,8 @@ use actix_service::{
 use futures_core::{future::LocalBoxFuture, ready};
 use pin_project_lite::pin_project;
 use tokio::net::TcpStream;
+#[cfg(feature = "http2")]
+use tokio::time::timeout_at;
 use tracing::error;
 
 use crate::{
@@ -233,30 +235,41 @@ where
     ) -> impl ServiceFactory<TcpStream, Config = (), Response = (), Error = DispatchError, InitError = ()>
     {
         let tcp_nodelay = self.cfg.tcp_nodelay();
+        let config = self.cfg.clone();
+
+        fn_service(move |io: TcpStream| {
+            let deadline = config.client_request_deadline();
+
+            async move {
+                // subset of HTTP/2 preface defined by RFC 9113 §3.4
+                // this subset was chosen to maximize likelihood that peeking only once will allow us to
+                // reliably determine version or else it should fallback to h1 and fail quickly if data
+                // on the wire is junk
+                const H2_PREFACE: &[u8] = b"PRI * HTTP/2";
+
+                let mut buf = [0; 12];
+
+                if let Some(deadline) = deadline {
+                    timeout_at(deadline.into(), io.peek(&mut buf))
+                        .await
+                        .map_err(|_| std::io::Error::from(std::io::ErrorKind::TimedOut))??;
+                } else {
+                    io.peek(&mut buf).await?;
+                }
 
-        fn_service(move |io: TcpStream| async move {
-            // subset of HTTP/2 preface defined by RFC 9113 §3.4
-            // this subset was chosen to maximize likelihood that peeking only once will allow us to
-            // reliably determine version or else it should fallback to h1 and fail quickly if data
-            // on the wire is junk
-            const H2_PREFACE: &[u8] = b"PRI * HTTP/2";
-
-            let mut buf = [0; 12];
-
-            io.peek(&mut buf).await?;
+                let proto = if buf == H2_PREFACE {
+                    Protocol::Http2
+                } else {
+                    Protocol::Http1
+                };
 
-            let proto = if buf == H2_PREFACE {
-                Protocol::Http2
-            } else {
-                Protocol::Http1
-            };
+                if let Some(nodelay) = desired_nodelay(tcp_nodelay) {
+                    set_nodelay(&io, nodelay);
+                }
 
-            if let Some(nodelay) = desired_nodelay(tcp_nodelay) {
-                set_nodelay(&io, nodelay);
+                let peer_addr = io.peer_addr().ok();
+                Ok((io, proto, peer_addr))
             }
-
-            let peer_addr = io.peer_addr().ok();
-            Ok((io, proto, peer_addr))
         })
         .and_then(self)
     }
-- 
2.43.0

Fuente: NVD

Relacionado Rust Vulnerabilidades:

CVE ID

Gravedad

Puntuación

Tecnologías

Nombre del componente

Exploit CISA KEV

Tiene solución

Fecha de publicación

GHSA-r22c-jv85-9pj3HIGH7.5
  • Rust logoRust
  • hickory-net
NoSíNov 24, 2026
GHSA-p4cp-vhp5-73wjMEDIUM6.9
  • Rust logoRust
  • actix-http
NoSíNov 24, 2026
GHSA-qrr7-2g7f-r9rgHIGHN/A
  • Rust logoRust
  • wasmi
NoSíNov 24, 2026
GHSA-479r-5fmc-p9xqLOWN/A
  • Rust logoRust
  • hickory-net
NoSíNov 24, 2026
GHSA-qgw4-m8xx-p695MEDIUMN/A
  • Rust logoRust
  • hickory-net
NoSíNov 24, 2026

Evaluación gratuita de vulnerabilidades

Haz un benchmark de tu postura de seguridad en la nube

Evalúa tus prácticas de seguridad en la nube en 9 dominios de seguridad para evaluar tu nivel de riesgo e identificar brechas en tus defensas.

Evaluación de solicitudes

Recursos adicionales de Wiz

Obtén una demostración personalizada

¿Listo para ver a Wiz en acción?

"La mejor experiencia de usuario que he visto en mi vida, proporciona una visibilidad completa de las cargas de trabajo en la nube."
David EstlickCISO
"Wiz proporciona un panel único para ver lo que ocurre en nuestros entornos en la nube."
Adam FletcherJefe de Seguridad
"Sabemos que si Wiz identifica algo como crítico, en realidad lo es."
Greg PoniatowskiJefe de Gestión de Amenazas y Vulnerabilidades