# GHSA-RX38-P542-V527: PoW v2 fallback verification does not enforce keyPrefix

- Database: GitHub
- Severity: CVSS 7.5 (High)
- Published: 2026-07-30
- Modified: 2026-11-02

## Affected versions

- altcha-lib (npm): fixed in 2.3.2
- altcha (Hex): 2.0.0
- org.altcha/altcha (Maven): fixed in 2.0.3
- altcha (crates.io): fixed in 0.2.0
- altcha (RubyGems): fixed in 2.0.1
- altcha\_lib (Pub): fixed in 0.3.1
- altcha (PyPI): fixed in 2.1.0

## Description

### Summary

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

- [Dart Lib v0.3.1](https://github.com/altcha-org/altcha-lib-dart/commit/4308e5d3f8fe8142b44084b40a6e37dffb415687)
- [Elixir Lib v2.0.1](https://github.com/altcha-org/altcha-lib-ex/commit/52f8e8982c6162139c1372e5c358681f0696ae2e)
- [Java Lib v2.0.3](https://github.com/altcha-org/altcha-lib-java/commit/7c736be3df59e9444966b161c8035c3f4557c9a2)
- [TS Lib v2.3.2](https://github.com/altcha-org/altcha-lib/commit/e2a6daf192a3c242d5638bc49621a12f46afc6ed)
- [Python Lib v2.1.0](https://github.com/altcha-org/altcha-lib-py/commit/2f70cdbfbaf3d23f54c98ab3277a94486a7401cb)
- [Ruby Lib v2.0.1](https://github.com/altcha-org/altcha-lib-rb/commit/dd4c178a283e766299123b762e1925aa71a9d47f)
- [Rust Lib v0.2.0](https://github.com/altcha-org/altcha-lib-rs/commit/fd9bc042c08db4e2e11ceb39d9a459ee5a872310)

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

## References

- https://github.com/altcha-org/altcha-lib/security/advisories/GHSA-rx38-p542-v527

Page: https://cve.now/GHSA-RX38-P542-V527

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
