🛡️ GHSA-m4w9-hjfw-vwj4 — http4k-core

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-345 OSV
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

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

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.

Patches

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.

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

  • Fix release: [v6.49.0.0](https://github.com/http4k/http4k/releases/tag/6.49.0.0)
  • Background: [RFC 2104 — HMAC: Keyed-Hashing for Message Authentication](https://datatracker.ietf.org/doc/html/rfc2104)

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. Rated impact: confidentiality none, integrity high, availability none.

Weakness class

GHSA-m4w9-hjfw-vwj4 is classified as CWE-345: Insufficient Verification of Data Authenticity. Data is trusted without confirming it really came from the claimed source and was not altered.

Affected software

GHSA-m4w9-hjfw-vwj4 is recorded against 1 package.

  • org.http4k:http4k-core (fixed in 6.49.0.0)

Timeline and source

Published on 19 June 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

github.com (Web)
datatracker.ietf.org (Web)
github.com (Package)
github.com (Web)

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
CWE CWE-345
Public Exploit ✅ No
Source OSV
Published 2026-06-19
Updated 2026-08-20
Modified 2026-06-19
Fix URL N/A

Affected Packages

Software From version Fixed in
org.http4k:http4k-core 6.49.0.0

Similar Threats

Site Security Check

Is http4k-core part of your stack?

GHSA-m4w9-hjfw-vwj4 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesGitHub AdvisoryGitHub Advisory Undated