reCAPTCHA Bypass via Hardcoded Test Keys in CouchCMS ≤ 2.4
Title: reCAPTCHA Bypass via Hardcoded Test Keys in CouchCMS ≤ 2.4#
BUG_Author: security_researcher
Affected Version: CouchCMS ≤ 2.4
Vendor: CouchCMS GitHub Repository
Software: CouchCMS
Vulnerability Files:
couch/config.example.phpcouch/addons/recaptcha/recaptcha.php
Description:#
Hardcoded Google reCAPTCHA Test Keys:
In the file
couch/config.example.php, the default reCAPTCHA configuration uses Google's official test keys which always returnsuccess: truefor any verification request.The vulnerable code at lines 160-161:
define( 'K_RECAPTCHA_SITE_KEY', '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' );
define( 'K_RECAPTCHA_SECRET_KEY', '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe' );
Exploiting the Vulnerability:
These keys are Google's publicly documented test keys that bypass all CAPTCHA validation.
Any form protected by reCAPTCHA (contact forms, comment forms, registration forms) can be automated without solving the CAPTCHA.
The validation in
couch/addons/recaptcha/recaptcha.phpat line 82 checks$response['success']which will always betruewith test keys.
Impact:
Automated spam submission on contact forms
Brute force attacks on login forms
Mass comment spam
Automated account registration
Proof of Concept:#
Verify the vulnerability by sending a direct API request to Google's reCAPTCHA verification endpoint:
curl -X POST "https://www.google.com/recaptcha/api/siteverify" \
-d "secret=6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe" \
-d "response=any_random_string_here"The response will always return success:
{
"success": true,
"challenge_ts": "2025-12-18T09:30:31Z",
"hostname": "testkey.google.com"
}To exploit on a CouchCMS installation with default config, submit any form with reCAPTCHA protection using any value for the
g-recaptcha-responseparameter:curl -X POST "http://<target>/contact.php" \
-d "name=attacker" \
-d "email=attacker@evil.com" \
-d "message=spam_content" \
-d "g-recaptcha-response=bypass_string"The form submission will succeed, bypassing CAPTCHA protection entirely.