http4k, Algorithm Forcing Vulnerability, CVE-2026-54147 (Moderate) -DC-Aug2026-1572

Listen to this Post

How CVE-2026-54147 Works

An issue exists in DigestAuthProvider.verify: the configured algorithm parameter is silently ignored—every verification uses MD5 regardless of configuration. Deployments believing they are running SHA-256 Digest authentication are silently inheriting MD5’s collision weaknesses, including documented attack paths against Digest schemes that rely on the hash being collision-resistant. The bug has been present since `DigestAuthProvider` was introduced (commit 8a52b615b1, 2021). Any application using `http4k-security-digest` for HTTP Digest authentication is affected.
When an application configures `DigestAlgorithm.SHA-256` (or any algorithm other than MD5), the `verify` method ignores that configuration and hardcodes MD5 for all nonce and response hash computations. This means the security posture is silently downgraded without any warning or error. Attackers who can capture a Digest authentication handshake can leverage MD5’s known collision attacks (e.g., chosen-prefix collisions) to forge valid responses or impersonate users, depending on the broader application context.
The fix, released in http4k CE v6.50.0.0 and http4k EE LTS v5.42.0.0 / v4.51.0.0, hashes with the configured algorithm instead of hardcoded MD5.

DailyCVE Form

Platform: http4k-security-digest
Version: ≤6.49.0.0 / ≤5.41.0.0 / ≤4.50.0.0
Vulnerability: Algorithm ignored → MD5
Severity: Moderate (CVSS 6.5)
Date: 2026-06-16

Prediction: Patch already released 2026-05-31

What Undercode Say

Analytics of the vulnerability surface:

  • Affected module: `org.http4k:http4k-security-digest`
    – Affected versions:
  • Community (v6.x): 6.49.0.0 and below → fixed in 6.50.0.0
  • Enterprise LTS (v5.x): 5.41.0.0 and below → fixed in 5.42.0.0
  • Enterprise LTS (v4.x): 4.50.0.0 and below → fixed in 4.51.0.0
  • Introduced: commit `8a52b615b1` (2021)
  • Discovered: 2026-05-30 during Claude-assisted security review
  • CVE assigned: 2026-06-12 by GitHub
  • Public disclosure: 2026-06-16
  • Advisory: GHSA-vxxm-wwqh-mh47

Check your dependency:

Maven
mvn dependency:tree | grep http4k-security-digest
Gradle
./gradlew dependencies | grep http4k-security-digest
Direct inspection (pom.xml)
grep -A5 "http4k-security-digest" pom.xml

Verify the fix is applied (Kotlin example):

// Before (vulnerable) — algorithm parameter ignored
DigestAuthProvider(
credentials = myCredentials,
algorithm = DigestAlgorithm.SHA-256 // silently ignored, MD5 used
)
// After (fixed) — algorithm parameter respected
DigestAuthProvider(
credentials = myCredentials,
algorithm = DigestAlgorithm.SHA-256 // now actually uses SHA-256
)

Exploit (Educational Purposes!)

⚠️ WARNING: The following is for educational and defensive purposes only. Do not use against systems without explicit authorization.
A captured Digest authentication response can be exploited because the algorithm is forced to MD5:
1. Capture a Digest challenge-response (network sniffing or log access):
– Client sends `Authorization: Digest username=”user”, realm=”…”, nonce=”…”, uri=”…”, response=”“`
– The `response` value is computed as: `MD5(MD5(username:realm:password):nonce:MD5(method:uri))`
2. Because MD5 is used regardless of configuration, an attacker can:
– Perform offline MD5 collision attacks against the captured hash
– Use chosen-prefix collision techniques (e.g., using tools like hashclash) to craft an alternate credential that produces the same MD5 digest
– Replay the forged response against the same realm
3. The attacker does not need to know the actual password—only to produce a collision with the captured MD5 hash.

  Conceptual attack flow (not a working exploit)
  Capture a valid Digest response with MD5 hash
  echo "MD5(username:realm:password):nonce:MD5(method:uri)" > target_hash.txt
  Use MD5 collision tools (e.g., hashclash, fastcoll) to find collision
  This is computationally intensive but feasible for MD5
  fastcoll -p prefix.bin -o col1.bin col2.bin
  Replay forged Authorization header with collision payload
  curl -H "Authorization: Digest username=attacker, response=<collision_hash>" https://target/api
  

Protection

1. Upgrade immediately to the fixed versions:

  • v6.x (Community): upgrade to 6.50.0.0 or higher
  • v5.x (Enterprise LTS): upgrade to 5.42.0.0 or higher
  • v4.x (Enterprise LTS): upgrade to 4.51.0.0 or higher
  1. For http4k EE subscribers, fixed LTS versions are available through the dedicated http4k Maven instance:
    Contact: [email protected]
    

3. If unable to upgrade immediately:

  • Do not rely on the configured `algorithm` parameter
  • Assume MD5 is in use regardless of configuration
  • Treat Digest credentials as low-trust
  • Consider additional authentication layers (e.g., mutual TLS, API keys)
  • Shorten nonce validity windows to reduce replay window
  • Monitor for unusual authentication patterns

4. Verify the fix:

// After upgrade, confirm the algorithm is respected
val provider = DigestAuthProvider(credentials, DigestAlgorithm.SHA-256)
// provider now uses SHA-256, not MD5

Impact

  • Confidentiality: MD5’s collision weaknesses allow attackers to potentially forge Digest authentication responses
  • Integrity: A captured Digest response can be leveraged to impersonate legitimate users
  • Availability: Not directly impacted; however, successful impersonation can lead to unauthorized data modification or deletion
  • Scope: Any application using `http4k-security-digest` for HTTP Digest authentication
  • Attack complexity: Requires capturing a valid Digest authentication handshake (network observation, log access, etc.)—non-trivial but feasible in many deployments
  • Remediation effort: Low—upgrade to the patched version; no code changes required beyond version bump

🎯Let’s Practice Exploiting & Learn Patching For Free:

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top