{"id":"CVE-2025-58369","aliases":["CVE-2025-58369","GHSA-rrw2-px9j-qffj"],"related":[],"kind":"vulnerability","state":"published","title":"fs2: Half-shutdown of socket during TLS handshake may result in spin loop on opposite side","summary":"fs2 is a compositional, streaming I/O library for Scala. Versions up to and including 2.5.12, 3.0.0-M1 through 3.12.2, and 3.13.0-M1 through 3.13.0-M6 are vulnerable to denial of service attacks though TLS sessions using fs2-io on the JVM using the fs2.io.net.tls package. When establishing a TLS session, if one side of the connection shuts down `write` while the peer side is awaiting more data to progress the TLS handshake, the peer side will spin loop on the socket read, fully utilizing a CPU. The CPU is consumed until the overall connection is closed, potentially shutting down a fs2-io powered server. This issue is fixed in versions  2.5.13, 3.12.1, and 3.13.0-M7.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"fs2 is a compositional, streaming I/O library for Scala. Versions up to and including 2.5.12, 3.0.0-M1 through 3.12.2, and 3.13.0-M1 through 3.13.0-M6 are vulnerable to denial of service attacks though TLS sessions using fs2-io on the JVM using the fs2.io.net.tls package. When establishing a TLS session, if one side of the connection shuts down `write` while the peer side is awaiting more data to progress the TLS handshake, the peer side will spin loop on the socket read, fully utilizing a CPU. The CPU is consumed until the overall connection is closed, potentially shutting down a fs2-io powered server. This issue is fixed in versions  2.5.13, 3.12.1, and 3.13.0-M7.","source":"cvelist"},{"lang":"en","text":"### Impact\nWhen establishing a TLS session using `fs2-io` on the JVM using the `fs2.io.net.tls` package, if one side of the connection shuts down write while the peer side is awaiting more data to progress the TLS handshake, the peer side will spin loop on the socket read, fully utilizing a CPU. This CPU is consumed until the overall connection is closed.\n\nThis could be used as a denial of service attack on an fs2-io powered server -- for example, by opening many connections and putting them in a half-shutdown state.\n\nNote: this issue impacts ember backed http4s servers with HTTPS as a result of ember using fs2's TLS support.\n\n### Patches\nFixed in fs2 3.12.2 and 3.13.0-M7.\n\n### Workarounds\nNo workarounds.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n[Open an issue.](https://github.com/typelevel/fs2/issues/new/choose)\nContact the [Typelevel Security Team](https://github.com/typelevel/.github/blob/main/SECURITY.md).","format":"markdown","source":"ghsa"},{"lang":"es","text":"fs2 es una biblioteca de E/S composicional y de streaming para Scala. Las versiones hasta la 2.5.12 inclusive, de la 3.0.0-M1 a la 3.12.2, y de la 3.13.0-M1 a la 3.13.0-M6 son vulnerables a ataques de denegación de servicio a través de sesiones TLS usando fs2-io en la JVM utilizando el paquete fs2.io.net.tls. Al establecer una sesión TLS, si un lado de la conexión cierra la 'escritura' mientras el lado par está esperando más datos para avanzar el handshake TLS, el lado par entrará en un bucle de espera activa en la lectura del socket, utilizando completamente una CPU. La CPU es consumida hasta que la conexión general se cierra, potencialmente apagando un servidor impulsado por fs2-io. Este problema está solucionado en las versiones 2.5.13, 3.12.1 y 3.13.0-M7.","source":"nvd"}],"published":"2025-09-05T20:58:23.000Z","modified":"2026-10-01T16:10:00.257Z","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:L","score":5.3,"rating":"MEDIUM"},"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:L","score":5.3,"rating":"MEDIUM"},{"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:L","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-400"],"affected":[{"ranges":[{"version":">= 3.0.0-M1, < 3.12.2","status":"affected"},{"version":">= 3.13.0-M1, < 3.13.0-M7","status":"affected"},{"version":"< 2.5.13","status":"affected"}],"vendor":"typelevel","product":"fs2","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"3.0.0-M1","status":"affected","fixed":"3.12.2"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_2.12","purl":"pkg:maven/co.fs2/fs2-io_2.12","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.13.0-M1","status":"affected","fixed":"3.13.0-M7"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_2.12","purl":"pkg:maven/co.fs2/fs2-io_2.12","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.0.0-M1","status":"affected","fixed":"3.12.2"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_2.13","purl":"pkg:maven/co.fs2/fs2-io_2.13","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.13.0-M1","status":"affected","fixed":"3.13.0-M7"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_2.13","purl":"pkg:maven/co.fs2/fs2-io_2.13","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.0.0-M1","status":"affected","fixed":"3.12.2"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_3","purl":"pkg:maven/co.fs2/fs2-io_3","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.13.0-M1","status":"affected","fixed":"3.13.0-M7"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_3","purl":"pkg:maven/co.fs2/fs2-io_3","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_0.26","purl":"pkg:maven/co.fs2/fs2-io_0.26","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_0.27","purl":"pkg:maven/co.fs2/fs2-io_0.27","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_2.11","purl":"pkg:maven/co.fs2/fs2-io_2.11","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_2.12.0-M4","purl":"pkg:maven/co.fs2/fs2-io_2.12.0-M4","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_2.12.0-RC1","purl":"pkg:maven/co.fs2/fs2-io_2.12.0-RC1","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_2.12.0-M5","purl":"pkg:maven/co.fs2/fs2-io_2.12.0-M5","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_2.12.0-RC2","purl":"pkg:maven/co.fs2/fs2-io_2.12.0-RC2","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_2.13.0-M5","purl":"pkg:maven/co.fs2/fs2-io_2.13.0-M5","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.5.13"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_2.12","purl":"pkg:maven/co.fs2/fs2-io_2.12","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.5.13"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_2.13","purl":"pkg:maven/co.fs2/fs2-io_2.13","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.5.13"}],"ecosystem":"Maven","package":"co.fs2:fs2-io_3","purl":"pkg:maven/co.fs2/fs2-io_3","source":"ghsa"}],"references":[{"url":"https://github.com/typelevel/fs2/security/advisories/GHSA-rrw2-px9j-qffj","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/typelevel/fs2/issues/3590","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/typelevel/fs2/commit/46e2dc3abf994dcf3d0b804b2ddb3c10c04d4976","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/typelevel/fs2/commit/5c6c4c6c1ef330f7e6b53661ecc63d5f5ba8885c","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/typelevel/fs2/commit/edf0c4f2e660360d1c1a8c5377ce32294de89238","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/typelevel/fs2/releases/tag/v3.12.2","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/typelevel/fs2/releases/tag/v3.13.0-M7","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-58369","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/typelevel/fs2/pull/3624","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/typelevel/fs2","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-09-08T20:09:25.588Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-58369","url":"https://www.cve.org/CVERecord?id=CVE-2025-58369","licence":"CVE Terms of Use","modified":"2025-11-07T11:52:43.148Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rrw2-px9j-qffj","url":"https://github.com/advisories/GHSA-rrw2-px9j-qffj","licence":"CC-BY-4.0","modified":"2025-11-07T13:16:09.728Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-58369","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-58369","licence":"Public domain","modified":"2026-10-01T16:10:00.257Z"}],"updatedAt":"2026-11-25T22:59:04.292Z","epss":{"score":0.00499,"percentile":0.44348,"date":"2026-12-01T12:00:22.000Z"}}