Executive brief
ALTCHA is a proof-of-work library used to prevent bot abuse and rate-limit attacks. A flaw in its cryptographic signature mechanism allows attackers to replay previously solved challenges beyond their intended expiration time, potentially bypassing bot mitigation and rate-limiting controls. The issue does not expose sensitive data directly but weakens the bot-prevention guarantees of systems relying on ALTCHA.
Technical details
The vulnerability is a cryptographic semantic binding flaw (CWE-347, CWE-115) in ALTCHA's HMAC signature implementation. The HMAC does not unambiguously bind challenge parameters (including expiration time) to the nonce, allowing attackers to reinterpret a valid proof-of-work submission by splicing the challenge payload and modifying the expiration value. This enables previously solved challenges to be reused beyond their intended lifetime. The attack is network-accessible and requires no authentication or user interaction. The impact is primarily on abuse-prevention mechanisms such as rate limiting and bot mitigation. Patches enforce explicit semantic separation between parameters and the nonce during HMAC computation. A temporary workaround involves appending a delimiter to the salt value before HMAC computation.
Affected products
- ALTCHA altcha-lib <1.4.1
- ALTCHA altcha-lib-go <1.0.0
- ALTCHA altcha (Erlang) <1.0.0
- ALTCHA altcha (Python) <1.0.0
- ALTCHA altcha (Ruby) <1.0.0
- ALTCHA altcha (PHP) <1.3.1
- ALTCHA altcha (Java) <1.3.0
Timeline
- 2025-12-16: disclosed
- 2025-12-16: patched: Patches available in multiple implementations (altcha-lib 1.4.1, altcha-lib-go 1.0.0, altcha-lib-php 1.3.1, altcha-lib-java 1.3.0, etc.)