Vulnerability in pyload-ng
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-40594 has been found in pyload-ng.
Attackers can target a specific entry point like Cookie header over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade pyload-ng to 0.5.0b3.dev98 or later.
If unsure, ask your IT team or search "pyload-ng CVE-2026-40594" on the vendor's site.
CVE-2026-40594 (pyload-ng) — CWE-346
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: Cookie header / set_session_cookie_secure / before_request / SESSION_COOKIE_SECURE
Patched: 0.5.0b3.dev98 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-346) exists in pyload-ng. Attackers reach the vulnerable code path via Cookie header without authentication.
Check the vendor advisory for the affected versions of pyload-ng. Attack surface: Cookie header / set_session_cookie_secure / before_request / SESSION_COOKIE_SECURE.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 0.5.0b3.dev98.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'pyload-ng' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1
Identify exposureidentify
grep -r 'pyload-ng' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
pyload-ngを grep し、稼働しているサービス・バージョンを把握する。 -
2
Apply patchpatch
Upgrade pyload-ng to 0.5.0b3.dev98ステージング環境で 0.5.0b3.dev98 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3
Post-deployment verificationverify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| PyPIpyload-ng |
< 0.5.0b3.dev98→ 0.5.0b3.dev98 |
0.5.0b3.dev98 |
| pippyload-ng |
< 0.5.0b3.dev98→ 0.5.0b3.dev98 |
0.5.0b3.dev98 |
Original description The description as published by the source.
Summary
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.
Details
The vulnerable code is in src/pyload/webui/app/__init__.py:75-84:
# Dynamically set SESSION_COOKIE_SECURE according to the value of X-Forwarded-Proto
# TODO: Add trusted proxy check
@app.before_request
def set_session_cookie_secure():
x_forwarded_proto = flask.request.headers.get("X-Forwarded-Proto", "")
is_secure = (
x_forwarded_proto.split(',')[0].strip() == "https" or
app.config["PYLOAD_API"].get_config_value("webui", "use_ssl")
)
flask.current_app.config['SESSION_COOKIE_SECURE'] = is_secure
The root cause has two components:
- No origin validation (CWE-346): The
X-Forwarded-Protoheader is read from any client request. This header is only trustworthy when set by a known reverse proxy. WithoutProxyFixmiddleware or a trusted proxy allowlist, any client can…
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
References
- advisory nvd.nist.gov
- exploit github.com
- package github.com
- web github.com
- web github.com