CVE-2026-71481: Cryptographic Signature Verification Bypass in ALTCHA PHP Library
Vulnerability ID: CVE-2026-71481
CVSS Score: 7.5
Published: 2026-11-18
CVE-2026-71481 (GHSA-82w8-65qw-gch6) is a cryptographic signature verification bypass (CWE-347) in the altcha-org/altcha PHP library affecting versions 2.0.0 through 2.0.2. Due to a flawed conditional check in the verifySolution method, omitting the signature field from a submitted challenge payload causes the server to skip HMAC verification entirely, even when a server-side HMAC secret is configured. Unauthenticated remote attackers can exploit this flaw to self-issue low-difficulty Proof-of-Work challenges, solve them with trivial effort, and bypass CAPTCHA controls.
TL;DR
The altcha-org/altcha PHP library (versions 2.0.0 to 2.0.2) skips HMAC signature verification in verifySolution() if the client omits the signature field from the challenge payload. Attackers can remove the signature, supply arbitrary low-difficulty Proof-of-Work parameters, and bypass CAPTCHA verification completely. Upgrade to version 2.0.3 to resolve the issue.
⚠️ Exploit Status: POC
Technical Details
- CVE / GHSA ID: CVE-2026-71481 / GHSA-82w8-65qw-gch6
- Weakness Class: CWE-347: Improper Verification of Cryptographic Signature
- Affected Component: altcha-org/altcha ( >= 2.0.0, < 2.0.3 ) - Altcha::verifySolution()
- Attack Vector: Remote, Unauthenticated via HTTP/HTTPS (AV:N/AC:L/PR:N/UI:N)
- CVSS v3.1 Score: 7.5 High (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N)
- Security Impact: Complete Proof-of-Work CAPTCHA Verification Bypass
- Exploit Status: Proof-of-Concept (Vendor unit test in commit 8b02ad2c9b82998613bac4d093517d457061cbbe)
- CISA KEV Status: Not Listed
Affected Systems
- altcha-org/altcha (Packagist / PHP Composer)
- altcha-org/altcha-lib-php
-
altcha-org/altcha: >= 2.0.0, < 2.0.3 (Fixed in:
2.0.3)
Code Analysis
Commit: 8b02ad2
fix: verifySolution - reject missing challenge signature when secret is set
diff --git a/src/Altcha.php b/src/Altcha.php
index f6ed05c..57fc7e0 100644
--- a/src/Altcha.php
+++ b/src/Altcha.php
@@ -116,7 +116,14 @@ public function verifySolution(VerifySolutionOptions $options): VerifySolutionRe
}
// Verify challenge signature
- if (null !== $payload->challenge->signature && null !== $this->hmacSignatureSecret) {
+ if (null !== $this->hmacSignatureSecret) {
+ if (null === $payload->challenge->signature) {
+ return new VerifySolutionResult(
+ verified: false,
+ invalidSignature: true,
+ time: microtime(true) - $startTime,
+ );
+ }
$expectedSignature = $this->hmacHex($params->toCanonicalJson(), $this->hmacSignatureSecret);
if (!hash_equals($expectedSignature, $payload->challenge->signature)) {
return new VerifySolutionResult(
Mitigation Strategies
- Upgrade the altcha-org/altcha PHP library to version 2.0.3 or later to enforce mandatory signature presence when an HMAC secret is configured.
- Implement application-layer input validation prior to calling verifySolution() to reject any payload lacking a non-empty string in the challenge.signature field.
- Verify that hmacSignatureSecret is explicitly configured with a high-entropy cryptographic secret across all production instances of the Altcha class.
- Enforce rate-limiting and replay detection at the web server or WAF layer on sensitive endpoints protected by Proof-of-Work challenges.
Remediation Steps:
- Run
composer require altcha-org/altcha:^2.0.3in the application project directory. - Verify that
composer.lockreflects version2.0.3or greater for thealtcha-org/altchapackage. - Check application source code where
new Altcha(...)is instantiated to verify thathmacSignatureSecretis set to a non-null, cryptographically random string. - Deploy the updated dependencies and run automated test suites to confirm CAPTCHA verification rejects payloads with stripped signatures.
References
- GitHub Security Advisory GHSA-82w8-65qw-gch6
- Fix Commit 8b02ad2c9b82998613bac4d093517d457061cbbe
- ALTCHA PHP Library Release v2.0.3
- CVE-2026-71481 Record on CVE.org
- ALTCHA PHP Library GitHub Repository
Read the full report for CVE-2026-71481 on our website for more details including interactive diagrams and full exploit analysis.
Top comments (0)