GHSA-M4W9-HJFW-VWJ4

GHSA-M4W9-HJFW-VWJ4 is a high-severity security vulnerability in org.http4k:http4k-core (maven), affecting versions < 6.49.0.0. It is fixed in 6.49.0.0.

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

http4k: HmacSha256.hash (despite the Hmac naming) computed a plain unkeyed digest; clarified by deprecation in favour of Sha256.hash / Sha256.hmac

Workarounds

If you cannot upgrade and you need a real HMAC-SHA256, use javax.crypto.Mac.getInstance("HmacSHA256") with a SecretKeySpec. For an unkeyed SHA-256 digest, use java.security.MessageDigest.getInstance("SHA-256"). The keyed hmacSHA256(key, data) was always correctly implemented and is safe to use as-is.

References

Impact

The HmacSha256 class contained two functions:

  • hash(payload), a plain unkeyed SHA-256 digest. The Hmac prefix in the class name was misleading; this function has no key parameter, so it could never have been an HMAC.
  • hmacSHA256(key, data), a properly keyed HMAC-SHA256.

A reader who didn't engage with the function signature could in principle have assumed HmacSha256.hash(payload) was somehow keyed, but the absence of any key parameter made that misuse unlikely in practice.

Who is affected: any downstream caller who read the class name and used HmacSha256.hash as a message authentication code without noticing it takes no key. Verified at v6.47.2.0: zero internal misuse in http4k itself. Both production usages of HmacSha256.hash (AWS SigV4 canonical-request hashing in AwsSignatureV4Signer.kt and x-amz-content-sha256 in awsExtensions.kt) are AWS-spec-correct uses of plain SHA-256; every keyed hmacSHA256(key, data) call passes a real key. The advisory exists so any downstream caller relying on the misleadingly-named API knows to migrate.

Affected versions

org.http4k:http4k-core (< 6.49.0.0)

Security releases

org.http4k:http4k-core → 6.49.0.0 (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

Upgrade to 6.49.0.0 or later. The fix introduces:

  • Sha256.hash(input), unkeyed digest (the actual behaviour HmacSha256.hash provided).
  • Sha256.hmac(key, input), keyed HMAC-SHA256 (the behaviour the name implied).

HmacSha256 is deprecated. Existing callers continue to work via deprecation shims; migrate to Sha256.hash or Sha256.hmac per intent.

Frequently Asked Questions

  1. What is GHSA-M4W9-HJFW-VWJ4? GHSA-M4W9-HJFW-VWJ4 is a high-severity security vulnerability in org.http4k:http4k-core (maven), affecting versions < 6.49.0.0. It is fixed in 6.49.0.0.
  2. Which versions of org.http4k:http4k-core are affected by GHSA-M4W9-HJFW-VWJ4? org.http4k:http4k-core (maven) versions < 6.49.0.0 is affected.
  3. Is there a fix for GHSA-M4W9-HJFW-VWJ4? Yes. GHSA-M4W9-HJFW-VWJ4 is fixed in 6.49.0.0. Upgrade to this version or later.
  4. Is GHSA-M4W9-HJFW-VWJ4 exploitable, and should I be worried? Whether GHSA-M4W9-HJFW-VWJ4 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
  5. What actually determines whether GHSA-M4W9-HJFW-VWJ4 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.
  6. How do I fix GHSA-M4W9-HJFW-VWJ4? Upgrade org.http4k:http4k-core to 6.49.0.0 or later.

Other vulnerabilities in org.http4k:http4k-core

Stop the waste.
Protect your environment with Kodem.