CVE-2021-41084

CVE-2021-41084 is a high-severity server-side request forgery (SSRF) vulnerability in org.http4s:http4s-client_2.12 (maven), affecting versions <= 0.21.28. It is fixed in 0.21.29, 0.22.5, 0.23.4.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Response Splitting from unsanitized headers

Workarounds

http4s services and client applications should sanitize any user input in the aforementioned fields before returning a request or response to the backend. The carriage return, newline, and null characters are the most threatening.

Not all backends were affected: jetty-server, tomcat-server, armeria, and netty on the server; async-http-client, okhttp-client, armeria, and netty as clients.

References

For more information

If you have any questions or comments about this advisory:

Impact

Untrusted input controls the target URL of a server-initiated request, which may reach internal services not otherwise accessible from outside. Typical impact: access to internal metadata services, internal APIs, or cloud credentials.

CVE-2021-41084 has a CVSS score of 8.7 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.21.29, 0.22.5, 0.23.4); upgrading removes the vulnerable code path.

Affected versions

org.http4s:http4s-client_2.12 (<= 0.21.28) org.http4s:http4s-client_2.12 (>= 0.22.0, <= 0.22.4) org.http4s:http4s-client_2.12 (>= 0.23.0, <= 0.23.3) org.http4s:http4s-client_2.13 (<= 0.21.28) org.http4s:http4s-client_2.13 (>= 0.22.0, <= 0.22.4) org.http4s:http4s-client_2.13 (>= 0.23.0, <= 0.23.3) org.http4s:http4s-client_3 (<= 0.21.28) org.http4s:http4s-client_3 (>= 0.22.0, <= 0.22.4) org.http4s:http4s-client_3 (>= 0.23.0, <= 0.23.3) org.http4s:http4s-server_2.10 (<= 0.21.28) org.http4s:http4s-server_2.11 (<= 0.21.28) org.http4s:http4s-server_2.12 (<= 0.21.28) org.http4s:http4s-server_2.12 (>= 0.22.0, <= 0.22.4) org.http4s:http4s-server_2.12 (>= 0.23.0, <= 0.23.3) org.http4s:http4s-server_2.13 (<= 0.21.28) org.http4s:http4s-server_2.13 (>= 0.22.0, <= 0.22.4) org.http4s:http4s-server_2.13 (>= 0.23.0, <= 0.23.3) org.http4s:http4s-server_2.13.0-M5 (<= 0.21.28) org.http4s:http4s-server_3 (>= 0.22.0, <= 0.22.4) org.http4s:http4s-server_3 (>= 0.23.0, <= 0.23.3)

Security releases

org.http4s:http4s-client_2.12 → 0.21.29 (maven) org.http4s:http4s-client_2.12 → 0.22.5 (maven) org.http4s:http4s-client_2.12 → 0.23.4 (maven) org.http4s:http4s-client_2.13 → 0.21.29 (maven) org.http4s:http4s-client_2.13 → 0.22.5 (maven) org.http4s:http4s-client_2.13 → 0.23.4 (maven) org.http4s:http4s-client_3 → 0.21.29 (maven) org.http4s:http4s-client_3 → 0.22.5 (maven) org.http4s:http4s-client_3 → 0.23.4 (maven) org.http4s:http4s-server_2.12 → 0.21.29 (maven) org.http4s:http4s-server_2.12 → 0.22.5 (maven) org.http4s:http4s-server_2.12 → 0.23.4 (maven) org.http4s:http4s-server_2.13 → 0.21.29 (maven) org.http4s:http4s-server_2.13 → 0.22.5 (maven) org.http4s:http4s-server_2.13 → 0.23.4 (maven) org.http4s:http4s-server_3 → 0.22.5 (maven) org.http4s:http4s-server_3 → 0.23.4 (maven)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Versions 0.21.29, 0.22.5, 0.23.4, and 1.0.0-M27 perform the following:

  • If a status reasoon phrase is invalid, it is dropped. Rendering is optional per spec.
  • If a header name is invalid in a request or response, the header is dropped. There is no way to generically sanitize a header without potentially shadowing a correct one.
  • If a header value is invalid in a request or response, it is sanitized by replacing null (\u0000), carriage return (\r), and newline (\n) with space ( ) characters per spec.
  • If a URI path or registered name is invalid in a request line, the client raises an IllegalArgumentException.
  • If a URI registered name is invalid in a host header, the client raises an IllegalArgumentException.

Frequently Asked Questions

  1. What is CVE-2021-41084? CVE-2021-41084 is a high-severity server-side request forgery (SSRF) vulnerability in org.http4s:http4s-client_2.12 (maven), affecting versions <= 0.21.28. It is fixed in 0.21.29, 0.22.5, 0.23.4. Untrusted input controls the target URL of a server-initiated request, which may reach internal services not otherwise accessible from outside.
  2. How severe is CVE-2021-41084? CVE-2021-41084 has a CVSS score of 8.7 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2021-41084?
    • org.http4s:http4s-client_2.12 (maven) (versions <= 0.21.28)
    • org.http4s:http4s-client_2.13 (maven) (versions <= 0.21.28)
    • org.http4s:http4s-client_3 (maven) (versions <= 0.21.28)
    • org.http4s:http4s-server_2.10 (maven) (versions <= 0.21.28)
    • org.http4s:http4s-server_2.11 (maven) (versions <= 0.21.28)
    • org.http4s:http4s-server_2.12 (maven) (versions <= 0.21.28)
    • org.http4s:http4s-server_2.13 (maven) (versions <= 0.21.28)
    • org.http4s:http4s-server_2.13.0-M5 (maven) (versions <= 0.21.28)
    • org.http4s:http4s-server_3 (maven) (versions >= 0.22.0, <= 0.22.4)
  4. Is there a fix for CVE-2021-41084? Yes. CVE-2021-41084 is fixed in 0.21.29, 0.22.5, 0.23.4. Upgrade to this version or later.
  5. Is CVE-2021-41084 exploitable, and should I be worried? Whether CVE-2021-41084 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2021-41084 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2021-41084?
    • Upgrade org.http4s:http4s-client_2.12 to 0.21.29 or later
    • Upgrade org.http4s:http4s-client_2.12 to 0.22.5 or later
    • Upgrade org.http4s:http4s-client_2.12 to 0.23.4 or later
    • Upgrade org.http4s:http4s-client_2.13 to 0.21.29 or later
    • Upgrade org.http4s:http4s-client_2.13 to 0.22.5 or later
    • Upgrade org.http4s:http4s-client_2.13 to 0.23.4 or later
    • Upgrade org.http4s:http4s-client_3 to 0.21.29 or later
    • Upgrade org.http4s:http4s-client_3 to 0.22.5 or later
    • Upgrade org.http4s:http4s-client_3 to 0.23.4 or later
    • Upgrade org.http4s:http4s-server_2.12 to 0.21.29 or later
    • Upgrade org.http4s:http4s-server_2.12 to 0.22.5 or later
    • Upgrade org.http4s:http4s-server_2.12 to 0.23.4 or later
    • Upgrade org.http4s:http4s-server_2.13 to 0.21.29 or later
    • Upgrade org.http4s:http4s-server_2.13 to 0.22.5 or later
    • Upgrade org.http4s:http4s-server_2.13 to 0.23.4 or later
    • Upgrade org.http4s:http4s-server_3 to 0.22.5 or later
    • Upgrade org.http4s:http4s-server_3 to 0.23.4 or later

Stop the waste.
Protect your environment with Kodem.