{"id":"CVE-2026-33752","aliases":["GHSA-qw2m-4pqf-rmpp","PYSEC-2026-2431"],"title":"curl_cffi: Redirect-based SSRF leads to internal network access in curl_cffi (with TLS impersonation bypass)","summary":"curl_cffi: Redirect-based SSRF leads to internal network access in curl_cffi (with TLS impersonation bypass)","severity":"high","cvss":8.6,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","vendor":"curl-cffi","product":"curl-cffi","ecosystem":"pip","affected":["curl-cffi < 0.15.0"],"patched":["curl-cffi 0.15.0"],"published":"2026-04-03","updated":"2026-07-13","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-qw2m-4pqf-rmpp","references":[{"url":"https://github.com/lexiforest/curl_cffi/security/advisories/GHSA-qw2m-4pqf-rmpp"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33752"},{"url":"https://github.com/lexiforest/curl_cffi"}],"tags":["osv","pip","exploit-available"],"epss":0.00463,"epssPercentile":0.39235,"ingestedAt":"2026-07-13T18:58:02.283Z","exploits":{"github":1,"githubRepos":["https://github.com/redyank/CVE-2026-33752"],"checkedAt":"2026-09-21T15:28:42.558Z"},"exploitAvailable":true,"slug":"CVE-2026-33752","body":"## Overview\n\n### 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.\n\n## Affected packages\n\n- `curl-cffi < 0.15.0`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `curl-cffi 0.15.0`","depth":"midnight","depthScore":59,"depthScoreParts":{"impact":47.3,"likelihood":0.1,"exploitation":12,"ransomware":0},"changes":[{"seq":5112,"id":"CVE-2026-33752","ts":1788887248711,"field":"exploit_available","old":"false","new":"true"},{"seq":3995,"id":"CVE-2026-33752","ts":1788886364379,"field":"exploit_available","old":"true","new":"false"},{"seq":2810,"id":"CVE-2026-33752","ts":1788883031088,"field":"exploit_available","old":"false","new":"true"},{"seq":1839,"id":"CVE-2026-33752","ts":1788882434006,"field":"exploit_available","old":"true","new":"false"},{"seq":937,"id":"CVE-2026-33752","ts":1788881868024,"field":"exploit_available","old":"false","new":"true"}]}