Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. pyload-ng
  4. ›
  5. CVE-2026-40594

CVE-2026-40594: pyLoad has a Session Cookie Security Downgrade via Untrusted X-Forwarded-Proto Header Spoofing (Global State Race Condition)

April 16, 2026 (updated June 8, 2026)

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.

References

  • github.com/advisories/GHSA-mp82-fmj6-f22v
  • github.com/pyload/pyload/security/advisories/GHSA-mp82-fmj6-f22v
  • github.com/pypa/advisory-database/tree/main/vulns/pyload-ng/PYSEC-2026-125.yaml
  • nvd.nist.gov/vuln/detail/CVE-2026-40594

Code Behaviors & Features

Detect and mitigate CVE-2026-40594 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 0.5.0-b.3.dev98

Fixed versions

  • 0.5.0-b.3.dev98

Solution

Upgrade to version 0.5.0-b.3.dev98 or above.

Impact 4.8 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-346: Origin Validation Error

Source file

pypi/pyload-ng/CVE-2026-40594.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:03 +0000.