CVE-2025-58369

5.3 MEDIUM

📋 TL;DR

This CVE describes a denial-of-service vulnerability in fs2, a Scala streaming I/O library, where TLS sessions can be exploited to cause CPU spin loops. Attackers can trigger this by shutting down write operations during TLS handshakes, potentially crashing fs2-io powered servers. Users of fs2 versions up to 2.5.12, 3.0.0-M1 through 3.12.2, and 3.13.0-M1 through 3.13.0-M6 on JVM platforms are affected.

💻 Affected Systems

Products:
  • fs2 (functional streams for Scala)
Versions: fs2 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
Operating Systems: Any JVM platform (Linux, Windows, macOS)
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using fs2.io.net.tls package for TLS connections on JVM. Scala.js and Scala Native are not affected.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server shutdown due to CPU exhaustion, causing service unavailability for all users.

🟠

Likely Case

Degraded server performance and potential service disruption for some users during attack.

🟢

If Mitigated

Minimal impact with proper monitoring and quick response to anomalous CPU spikes.

🌐 Internet-Facing: MEDIUM - Attackers can exploit this remotely via TLS connections, but requires specific timing during handshake.
🏢 Internal Only: LOW - Internal systems typically have controlled TLS connections, reducing attack surface.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires precise timing during TLS handshake but no authentication. No public exploit code available as of analysis.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: fs2 2.5.13, 3.12.1, and 3.13.0-M7

Vendor Advisory: https://github.com/typelevel/fs2/releases/tag/v3.12.2

Restart Required: Yes

Instructions:

1. Update fs2 dependency in build.sbt or equivalent build file to patched version. 2. Rebuild and redeploy application. 3. Restart affected services.

🔧 Temporary Workarounds

Disable TLS or use alternative TLS implementation

all

Temporarily disable TLS connections or switch to alternative TLS libraries until patching is possible.

🧯 If You Can't Patch

  • Implement rate limiting on TLS connections to reduce attack surface
  • Monitor CPU usage and set up alerts for abnormal spikes during TLS handshakes

🔍 How to Verify

Check if Vulnerable:

Check fs2 version in build dependencies. If using sbt: 'sbt dependencyTree | grep fs2' or check build.sbt/pom.xml for fs2 version.

Check Version:

sbt 'show libraryDependencies' | grep fs2

Verify Fix Applied:

Verify updated fs2 version in dependencies matches patched versions (2.5.13, 3.12.1, or 3.13.0-M7).

📡 Detection & Monitoring

Log Indicators:

  • Unusually high CPU usage during TLS handshakes
  • Multiple TLS connection failures with timing patterns

Network Indicators:

  • Abnormal TLS handshake patterns with premature write shutdowns

SIEM Query:

source="application_logs" AND ("TLS handshake" OR "fs2.io.net.tls") AND (cpu_usage > 90)

🔗 References

📤 Share & Export