{"id":"CVE-2026-39376","aliases":["CVE-2026-39376","GHSA-4gx2-pc4f-wq37","PYSEC-2026-60"],"related":[],"kind":"vulnerability","state":"published","title":"FastFeedParser has an infinite redirect loop DoS via meta-refresh chain","summary":"FastFeedParser is a high performance RSS, Atom and RDF parser. Prior to 0.5.10, when parse() fetches a URL that returns an HTML page containing a <meta http-equiv=\"refresh\"> tag, it recursively calls itself with the redirect URL — with no depth limit, no visited-URL deduplication, and no redirect count cap. An attacker-controlled server that returns an infinite chain of HTML meta-refresh responses causes unbounded recursion, exhausting the Python call stack and crashing the process. This vulnerability can also be chained with the companion SSRF issue to reach internal network targets after bypassing the initial URL check. This vulnerability is fixed in 0.5.10.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"FastFeedParser is a high performance RSS, Atom and RDF parser. Prior to 0.5.10, when parse() fetches a URL that returns an HTML page containing a <meta http-equiv=\"refresh\"> tag, it recursively calls itself with the redirect URL — with no depth limit, no visited-URL deduplication, and no redirect count cap. An attacker-controlled server that returns an infinite chain of HTML meta-refresh responses causes unbounded recursion, exhausting the Python call stack and crashing the process. This vulnerability can also be chained with the companion SSRF issue to reach internal network targets after bypassing the initial URL check. This vulnerability is fixed in 0.5.10.","source":"cvelist"},{"lang":"en","text":"### Summary\nWhen `parse()` fetches a URL that returns an HTML page containing a `<meta http-equiv=\"refresh\">` tag, it recursively calls itself with the redirect URL — with no depth limit, no visited-URL deduplication, and no redirect count cap. An attacker-controlled server that returns an infinite chain of HTML meta-refresh responses causes unbounded recursion, exhausting the Python call stack and crashing the process. This vulnerability can also be chained with the companion SSRF issue to reach internal network targets after bypassing the initial URL check.\n\n\n### Details\n`parse()` catches `ValueError` on XML parse failure, extracts a meta-refresh URL from the HTML response via `_extract_meta_refresh_url()`, and tail-calls itself with that URL. The recursive call is unconditional — there is no maximum redirect depth, no set of already-visited URLs, and no guard against self-referential or looping redirects.\n\n**`fastfeedparser/main.py` — `parse()` (recursive sink):**\n```python\ndef parse(source: str | bytes, ...) -> FastFeedParserDict:\n    is_url = isinstance(source, str) and source.startswith((\"http://\", \"https://\"))\n    if is_url:\n        content = _fetch_url_content(source)\n    try:\n        return _parse_content(content, ...)\n    except ValueError as e:\n        ...\n        redirect_url = _extract_meta_refresh_url(content, source)\n        if redirect_url is None:\n            raise\n        return parse(redirect_url, ...)   # ← unconditional recursion, no depth limit\n```\n\n`_extract_meta_refresh_url()` uses `urljoin(base_url, match.group(1))` so relative, protocol-relative (`//host/path`), and absolute URLs in the `content=` attribute are all followed.\n\n### PoC\nNo live server required. The following monkeypatches `_fetch_url_content` to return an infinite HTML meta-refresh chain and confirms unbounded recursion:\n\n```python\nimport fastfeedparser.main as m\n\ncall_count = 0\n_orig = m._fetch_url_content\n\ndef mock_fetch(url):\n    global call_count\n    call_count += 1\n    if call_count > 10:\n        raise RuntimeError(f\"Stopped at call {call_count}\")\n    next_url = f\"http://169.254.169.254/step{call_count}/\"\n    return f\"\"\"<html><head>\n<meta http-equiv=\"refresh\" content=\"0; url={next_url}\">\n</head><body>not a feed</body></html>\"\"\".encode()\n\nm._fetch_url_content = mock_fetch\n\ntry:\n    m.parse(\"http://attacker.com/loop\")\nexcept RuntimeError as e:\n    print(f\"CONFIRMED infinite loop: {e}\")\nfinally:\n    m._fetch_url_content = _orig\n    print(f\"Total fetches before stop: {call_count}\")\n\n# Output:\n# CONFIRMED infinite loop: Stopped at call 11\n# Total fetches before stop: 11\n```\n\nEach recursive call performs a real HTTP request (30 s timeout), HTML parsing, and a Python stack frame allocation. With Python's default recursion limit of 1000 and a 30 s per-request timeout, a single attacker request can hold a server thread busy for up to ~8 hours before a `RecursionError` is raised.\n\n**SSRF chain variant:** The first response can be legitimate HTML redirecting to an internal address (`http://192.168.1.1/`), letting the redirect loop also serve as an SSRF bypass for targets that would otherwise be blocked by application-level URL validation applied only to the initial URL.\n\n\n\n### Impact\nThis is a denial-of-service vulnerability with a secondary SSRF-chaining impact. Any application that accepts user-supplied feed URLs and calls `fastfeedparser.parse()` is affected — including RSS aggregators, feed preview services, and \"subscribe by URL\" features. An attacker with no authentication can:\n\n- Hold a server worker thread indefinitely (one request per attacker connection)\n- Crash the worker process via `RecursionError` after ~1000 redirects\n- Use the redirect chain to pivot SSRF requests to internal network targets","format":"markdown","source":"ghsa"},{"lang":"es","text":"FastFeedParser es un analizador de alto rendimiento para RSS, Atom y RDF. Antes de la versión 0.5.10, cuando parse() obtiene una URL que devuelve una página HTML que contiene una etiqueta <meta http-equiv=\"refresh\">, se llama a sí mismo recursivamente con la URL de redirección - sin límite de profundidad, sin deduplicación de URL visitadas y sin límite de recuento de redirecciones. Un servidor controlado por un atacante que devuelve una cadena infinita de respuestas HTML meta-refresh causa una recursión ilimitada, agotando la pila de llamadas de Python y bloqueando el proceso. Esta vulnerabilidad también puede encadenarse con el problema SSRF asociado para alcanzar objetivos de red internos después de eludir la verificación inicial de la URL. Esta vulnerabilidad se corrige en la versión 0.5.10.","source":"nvd"}],"published":"2026-04-07T19:46:08.816Z","modified":"2026-07-24T21:10:00.143Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-400","CWE-674"],"affected":[{"ranges":[{"version":"< 0.5.10","status":"affected"}],"vendor":"kagisearch","product":"fastfeedparser","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.5.10"}],"ecosystem":"PyPI","package":"fastfeedparser","purl":"pkg:pypi/fastfeedparser","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.5.10"}],"vendor":"kagi","product":"fastfeedparser","cpe":"cpe:2.3:a:kagi:fastfeedparser:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.5.10"}],"ecosystem":"PyPI","package":"fastfeedparser","purl":"pkg:pypi/fastfeedparser","source":"pysec"}],"references":[{"url":"https://github.com/kagisearch/fastfeedparser/security/advisories/GHSA-4gx2-pc4f-wq37","tags":["evidence","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-39376","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/kagisearch/fastfeedparser","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/fastfeedparser/PYSEC-2026-60.yaml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-04-08T19:17:44.454Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-39376","url":"https://www.cve.org/CVERecord?id=CVE-2026-39376","licence":"CVE Terms of Use","modified":"2026-04-08T19:22:49.417Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4gx2-pc4f-wq37","url":"https://github.com/advisories/GHSA-4gx2-pc4f-wq37","licence":"CC-BY-4.0","modified":"2026-06-06T00:30:10.262Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-39376","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-39376","licence":"Public domain","modified":"2026-07-24T21:10:00.143Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-60","url":"https://osv.dev/vulnerability/PYSEC-2026-60","licence":"CC-BY-4.0","modified":"2026-05-20T09:19:00.162Z"}],"updatedAt":"2026-11-25T22:59:18.168Z","epss":{"score":0.00349,"percentile":0.3049,"date":"2026-12-01T12:00:22.000Z"}}