{"answers":{"affected":"2 open source packages ship an affected version, including org.http4k:http4k-core.","exploited":"There is no known exploitation of GHSA-m4w9-hjfw-vwj4 in the wild and no public exploit code.","fix":"Upgrade org.http4k:http4k-core to 6.49.0.0 or later.","what":"GHSA-m4w9-hjfw-vwj4 is a vulnerability in org.http4k:http4k-core, published on 19 Jun 2026."},"fix_prompt":"Check this codebase for GHSA-m4w9-hjfw-vwj4 and fix it if it is affected.\n\nWhat it is: GHSA-m4w9-hjfw-vwj4 is a vulnerability in org.http4k:http4k-core, published on 19 Jun 2026. \nExploitation: There is no known exploitation of GHSA-m4w9-hjfw-vwj4 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.http4k:http4k-core (Maven): affected all versions; fixed in 6.49.0.0\n- org.http4k:http4k-core (Maven): affected all versions; fixed in 6.49.0.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-m4w9-hjfw-vwj4/ (Markdown: https://insights.sbomify.com/GHSA-m4w9-hjfw-vwj4/index.md)","id":"GHSA-m4w9-hjfw-vwj4","markdown":"https://insights.sbomify.com/GHSA-m4w9-hjfw-vwj4/index.md","name":"GHSA-m4w9-hjfw-vwj4","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"unknown","non_default_config":false,"product_category":"Kotlin HTTP library","requires_auth":"none","summary":"Misleading API name led to potential use of unkeyed SHA-256 instead of HMAC, risking authentication bypass in downstream applications.","user_interaction":"not_required","vuln_class":"weak_cryptography"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\n\nThe `HmacSha256` class contained two functions:\n- `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.\n- `hmacSHA256(key, data)` — a properly keyed HMAC-SHA256.\n\nA 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.\n\n**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.\n\n### Patches\n\nUpgrade to **6.49.0.0** or later. The fix introduces:\n- `Sha256.hash(input)` — unkeyed digest (the actual behaviour `HmacSha256.hash` provided).\n- `Sha256.hmac(key, input)` — keyed HMAC-SHA256 (the behaviour the name implied).\n\n`HmacSha256` is deprecated. Existing callers continue to work via deprecation shims; migrate to `Sha256.hash` or `Sha256.hmac` per intent.\n\n### Workarounds\n\nIf 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.\n\n### References\n\n- Fix release: [v6.49.0.0](https://github.com/http4k/http4k/releases/tag/6.49.0.0)\n- Background: [RFC 2104 — HMAC: Keyed-Hashing for Message Authentication](https://datatracker.ietf.org/doc/html/rfc2104)","ecosystems":["Maven"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Impact The `HmacSha256` class contained two functions: - `hash(payload)` — a plain unkeyed SHA-256 digest.","id":"GHSA-m4w9-hjfw-vwj4","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Maven","product":null,"products":[],"type":"weak_cryptography","year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Maven","fixed":["6.49.0.0"],"introduced":["0"],"last_affected":[],"package":"org.http4k:http4k-core","purl":null,"source":"GHSA-m4w9-hjfw-vwj4"},{"ecosystem":"Maven","fixed":["6.49.0.0"],"introduced":["0"],"last_affected":[],"package":"org.http4k:http4k-core","purl":"pkg:maven/org.http4k/http4k-core","source":"GHSA-m4w9-hjfw-vwj4"}],"products":null,"published":"2026-06-19","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Misleading API name led to potential use of unkeyed SHA-256 instead of HMAC, risking authentication bypass in downstream applications.","url":"https://insights.sbomify.com/GHSA-m4w9-hjfw-vwj4/"}