Skip to main content
Menu
Advisories

PoW v2 fallback verification does not enforce keyPrefix

GHSA-RX38-P542-V527Published Updated GitHub

Description

In the fallback branch of verifySolution (used whenever a challenge has no keySignature, or the verifier doesn't have the matching hmacKeySignatureSecret), the derived key was checked only for equality against the value re-derived from the submitted counter. The required keyPrefix was never checked. This lets a client submit any counter with a single KDF execution and pass verification, entirely skipping the proof-of-work search the prefix is meant to enforce.

Impact

The fallback path covers:

  • Any probabilistic challenge.
  • Deterministic-mode challenges created without hmacKeySignatureSecret.
  • Deterministic-mode challenges where the verifier omits hmacKeySignatureSecret even though it was set at creation.

The recommended fast path (deterministic mode with a matching hmacKeySignatureSecret set on both creation and verification) was unaffected.

Patches

Go, PHP, C++ libraries are unaffected.

Workarounds

Use deterministic mode with hmacKeySignatureSecret set consistently on creation and verification to route through the unaffected fast path, or upgrade to patched versions.

References

Patch commit: e2a6daf

Affected versions

References

GitHub · altcha-org/altcha-lib