CVE-2026-40594 json
pyLoad: Session Cookie Security Downgrade via Untrusted X-Forwarded-Proto Header Spoofing (Global State Race Condition)
published 2026-04-16 6 mo ago modified 2026-06-17 4 mo ago also EUVD-2026-24207 , GHSA-mp82-fmj6-f22v , PYSEC-2026-125
- cvss
- 4.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 6%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi pyload-ng 0.5.0b3.dev69, 0.5.0b3.dev98
- pyload-ng_project pyload-ng 0.5.0b3.dev98
- pyload pyload 0.5.0b3.dev98
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 6 mo ago
Exploit prediction
0.17% chance of exploitation in the next 30 days, higher than 6% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/pyload/pyload/security/advisories/GHSA-mp82-fmj6-f22v referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 4.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L |
| GitHub | 3.1 | 4.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L |
| OSV | 3.1 | 4.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | pyload-ng | <0.5.0b3.dev98 <0.5.0b3.dev69 |
0.5.0b3.dev98 0.5.0b3.dev69 |
Affected products
- pyload pyload
Classification
- Weakness
-
- CWE-346 Origin Validation Error
References
-
github.com
/pyload/pyload/security/advisories/GHSA-mp82-fmj6-f22v
exploit, web, mitigation, vendor-advisory, evidence
-
nvd.nist.gov
/vuln/detail/CVE-2026-40594
advisory
-
github.com
/pyload/pyload
package
-
github.com
/pypa/advisory-database/tree/main/vulns/pyload-ng/PYSEC-2026-125.yaml
web
Sources
- CVE List CVE-2026-40594
- GitHub Advisory GHSA-mp82-fmj6-f22v
- NVD CVE-2026-40594
- OSV PYSEC-2026-125
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.