Advisory Database
  • Advisories
  • Dependency Scanning
  1. maven
  2. ›
  3. org.http4k/http4k-core
  4. ›
  5. GHSA-m4w9-hjfw-vwj4

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

June 19, 2026

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.

References

  • datatracker.ietf.org/doc/html/rfc2104
  • github.com/advisories/GHSA-m4w9-hjfw-vwj4
  • github.com/http4k/http4k/releases/tag/6.49.0.0
  • github.com/http4k/http4k/security/advisories/GHSA-m4w9-hjfw-vwj4

Code Behaviors & Features

Detect and mitigate GHSA-m4w9-hjfw-vwj4 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 6.49.0

Fixed versions

  • 6.49.0

Solution

Upgrade to version 6.49.0 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-345: Insufficient Verification of Data Authenticity

Source file

maven/org.http4k/http4k-core/GHSA-m4w9-hjfw-vwj4.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:23:41 +0000.