{"id":"CVE-2026-33752","aliases":["CVE-2026-33752","GHSA-qw2m-4pqf-rmpp","PYSEC-2026-2431"],"related":[],"kind":"vulnerability","state":"published","title":"Redirect-based SSRF leading to internal network access in curl_cffi (with TLS impersonation bypass)","summary":"curl_cffi is the a Python binding for curl. Prior to 0.15.0, curl_cffi does not restrict requests to internal IP ranges, and follows redirects automatically via the underlying libcurl. Because of this, an attacker-controlled URL can redirect requests to internal services such as cloud metadata endpoints. In addition, curl_cffi’s TLS impersonation feature can make these requests appear as legitimate browser traffic, which may bypass certain network controls. This vulnerability is fixed in 0.15.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"curl_cffi is the a Python binding for curl. Prior to 0.15.0, curl_cffi does not restrict requests to internal IP ranges, and follows redirects automatically via the underlying libcurl. Because of this, an attacker-controlled URL can redirect requests to internal services such as cloud metadata endpoints. In addition, curl_cffi’s TLS impersonation feature can make these requests appear as legitimate browser traffic, which may bypass certain network controls. This vulnerability is fixed in 0.15.0.","source":"cvelist"},{"lang":"en","text":"### Summary\ncurl_cffi does not restrict requests to internal IP ranges, and follows redirects automatically via the underlying libcurl.\n\nBecause of this, an attacker-controlled URL can redirect requests to internal services such as cloud metadata endpoints. In addition, curl_cffi’s TLS impersonation feature can make these requests appear as legitimate browser traffic, which may bypass certain network controls.\n\n### Details\nThe issue comes from how curl_cffi handles outbound requests\n- User-supplied URLs are passed directly to libcurl without checking whether they resolve to internal IP ranges (e.g., 127.0.0.1, 169.254.0.0/16).\n- Redirects are automatically followed (CURLOPT_FOLLOWLOCATION = 1) inside libcurl.\n- There is no validation of redirect destinations at the Python layer.\n\nThis means that even if an application only allows requests to external URLs, an attacker can\n- Provide a URL pointing to an attacker-controlled server\n- Return a redirect response pointing to an internal service\n- Have curl_cffi follow that redirect automatically\n\nAs a result, internal endpoints (such as cloud instance metadata APIs) can be accessed.\n\nAdditionally, curl_cffi supports TLS fingerprint impersonation (e.g., impersonate=\"chrome\"). In environments where outbound requests are filtered based on TLS fingerprinting, this can make such requests harder to detect or block\n\nThis behavior is similar to previously reported redirect-based SSRF issues such as CVE-2025-68616, where redirects allowed access to unintended internal resources.\n\n### PoC\n1. Direct internal request\n```\nimport curl_cffi\nresp = curl_cffi.get(\"http://169.254.169.254/latest/meta-data/\")\nprint(resp.text)\n```\n2. Redirect to internal service\nAttacker server:\n```\nGET /test\n→ 302 Location: http://169.254.169.254/latest/meta-data/\n```\nVictim code:\n```\nimport curl_cffi\nresp = curl_cffi.get(\"https://attacker.example/test\")\nprint(resp.text)\n```\nResult\n- Initial request goes to attacker server\n- Redirect is returned\n- libcurl follows the redirect automatically\n- Internal metadata endpoint is accessed\n\n3. With TLS impersonation\n```\nimport curl_cffi\\\nresp = curl_cffi.get(\n    \"https://attacker.example/test\",\n    impersonate=\"chrome\")\n```\nIn some environments, this may help the request bypass TLS-based filtering controls.\n\n\n### Impact\nAn attacker who can control the requested URL may be able to:\n- Access internal network services\n- Reach cloud metadata endpoints and retrieve sensitive information\n- Bypass certain outbound filtering mechanisms (depending on environment)\nThis corresponds to CWE-918 Server-Side Request Forgery.","format":"markdown","source":"ghsa"},{"lang":"es","text":"curl_cffi es un binding de Python para curl. Antes de la 0.15.0, curl_cffi no restringe las solicitudes a rangos de IP internos, y sigue las redirecciones automáticamente a través de la libcurl subyacente. Debido a esto, una URL controlada por un atacante puede redirigir las solicitudes a servicios internos como los endpoints de metadatos en la nube. Además, la característica de suplantación de TLS de curl_cffi puede hacer que estas solicitudes aparezcan como tráfico legítimo del navegador, lo que puede eludir ciertos controles de red. Esta vulnerabilidad está corregida en la 0.15.0.","source":"nvd"}],"published":"2026-04-03T21:36:44.000Z","modified":"2026-10-26T21:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","score":8.6,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","score":8.6,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","score":8.6,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","score":8.6,"rating":"HIGH"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":"< 0.15.0","status":"affected"}],"vendor":"lexiforest","product":"curl_cffi","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.15.0"}],"ecosystem":"PyPI","package":"curl-cffi","purl":"pkg:pypi/curl-cffi","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.15.0"},{"status":"affected","version":"0.15.0"},{"status":"affected","version":"0.15.0"},{"status":"affected","version":"0.15.0"},{"status":"affected","version":"0.15.0"}],"vendor":"lexiforest","product":"curl_cffi","cpe":"cpe:2.3:a:lexiforest:curl_cffi:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.15.0"}],"ecosystem":"PyPI","package":"curl-cffi","purl":"pkg:pypi/curl-cffi","source":"pysec"}],"references":[{"url":"https://github.com/lexiforest/curl_cffi/security/advisories/GHSA-qw2m-4pqf-rmpp","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33752","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/lexiforest/curl_cffi","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/curl-cffi","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-qw2m-4pqf-rmpp","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-04-06T15:34:30.230Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-33752","url":"https://www.cve.org/CVERecord?id=CVE-2026-33752","licence":"CVE Terms of Use","modified":"2026-04-06T15:40:54.380Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qw2m-4pqf-rmpp","url":"https://github.com/advisories/GHSA-qw2m-4pqf-rmpp","licence":"CC-BY-4.0","modified":"2026-07-13T16:42:36.740Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-33752","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33752","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2431","url":"https://osv.dev/vulnerability/PYSEC-2026-2431","licence":"CC-BY-4.0","modified":"2026-07-13T16:32:36.499Z"}],"updatedAt":"2026-11-25T22:59:18.015Z","epss":{"score":0.00492,"percentile":0.43839,"date":"2026-12-01T12:00:22.000Z"}}