# http4k misleading HmacSha256.hash naming leads to unkeyed digest usage

Source: https://junglewise.ai/threats/http4k-misleading-hmacsha256-hash-naming-leads-to-unkeyed-digest-usage-d5026b8c  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-19. Updated: 2026-06-19  
License: CC BY 4.0 with a link back

Severity: high · CVSS 8.2 · Published 2026-06-19

The http4k library contained a misleadingly named function that could lead developers to believe they were using a secure, keyed message authentication code (HMAC) when they were actually using a plain, unkeyed hash. If a developer relied on this function to verify the authenticity of data, an attacker could potentially forge messages because no secret key was actually being used for protection. This could lead to unauthorized data modification or bypass of security checks in applications using the library.

Technologies: [Http4k-Core](https://junglewise.ai/threats/technologies/http4k-core). Vendors: [Http4k](https://junglewise.ai/threats/vendors/http4k), [Maven](https://junglewise.ai/threats/vendors/maven).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** High severity, with a CVSS score of 8.2, published 19 June 2026.

**Which products and versions are affected?** Http4k-Core < 6.49.0.0; org.http4k:http4k-core (Maven) < 6.49.0.0.

**Is there a fix for This vulnerability?** A patch was published on 2026-06-19. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run Http4k-Core or org.http4k:http4k-core (Maven) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The `HmacSha256.hash(payload)` function in http4k-core was misleadingly named, as it implemented a plain unkeyed SHA-256 digest rather than a keyed Hash-based Message Authentication Code (HMAC). While the class also provided a correctly implemented `hmacSHA256(key, data)` function, the existence of the unkeyed `hash` function under the `Hmac` prefix creates a risk of developer error (CWE-345). If used for message authentication, an attacker could generate valid digests for arbitrary payloads since no secret key is involved in the calculation. The vulnerability is addressed in version 6.49.0.0 by deprecating the misleading class and introducing explicit `Sha256.hash` and `Sha256.hmac` methods.

## Affected products

- http4k http4k-core < 6.49.0.0

## Timeline

- 2026-06-16: disclosed
- 2026-06-19: advisory
- 2026-06-19: patched

## References

- [https://github.com/http4k/http4k/security/advisories/GHSA-m4w9-hjfw-vwj4](https://github.com/http4k/http4k/security/advisories/GHSA-m4w9-hjfw-vwj4)
- [https://datatracker.ietf.org/doc/html/rfc2104](https://datatracker.ietf.org/doc/html/rfc2104)
- [https://github.com/http4k/http4k/releases/tag/6.49.0.0](https://github.com/http4k/http4k/releases/tag/6.49.0.0)
- [https://api.github.com/repos/http4k/http4k/security-advisories/GHSA-m4w9-hjfw-vwj4](https://api.github.com/repos/http4k/http4k/security-advisories/GHSA-m4w9-hjfw-vwj4)

## Related threats

- [http4k cookie storage domain scoping bypass](https://junglewise.ai/threats/cve-2026-100725-http4k-maven-artifact-org-http4k-http4k-core-before-6-48-0-0-5)
- [http4k reverse proxy host header substring matching bypass](https://junglewise.ai/threats/cve-2026-100724-http4k-maven-package-org-http4k-http4k-core-before-6-49-0-0-5-42)
- [http4k unbounded gzip decompression denial of service](https://junglewise.ai/threats/cve-2026-53659-http4k-unbounded-gzip-decompression-denial-of-service)
- [http4k information exposure via improper cookie scoping in BasicCookieStorage](https://junglewise.ai/threats/http4k-information-exposure-via-improper-cookie-scoping-in-24a5c491)
- [http4k auth bypass via loose Host matching in reverseProxy](https://junglewise.ai/threats/http4k-auth-bypass-via-loose-host-matching-in-reverseproxy-bcd046a3)
