# GHSA-3vpc-4p9p-47hc: curl_cffi bundles a version of libcurl affected by High Severity vulnerability

> Attackers can exploit a bundled vulnerable libcurl version in curl_cffi to potentially execute code or read data via network requests.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Oct 2024

## What is GHSA-3vpc-4p9p-47hc?

GHSA-3vpc-4p9p-47hc is a vulnerability in curl-cffi, published on 22 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Summary
curl_cffi is potentially affected by High Severity vulnerability (CVE-2023-38545) in libcurl<8.4.0

### Details
HIGH severity vulnerability in curl and libcurl: [announcement](https://github.com/curl/curl/discussions/12026#discussioncomment-7195548)
Details are still unknown, but seems it will be a major issue as it's advertised by curl devs as "_probably the worst curl security flaw in a long time_".
A patched version (8.4.0) and details will be published around 06:00 UTC on October 11.
curl_cffi wheels on PyPI ship with libcurl 7.84.0

### PoC
[https://inspector.pypi.io/project/curl-cffi/0.5.10b2/packages/56/ae/eb7d39ad234f1f44650b910757d5aa696feff413d327c8328223ce78cb76/curl_cffi-0.5.10b2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/curl_cffi/include/curl/curlver.h](https://inspector.pypi.io/project/curl-cffi/0.5.10b2/packages/56/ae/eb7d39ad234f1f44650b910757d5aa696feff413d327c8328223ce78cb76/curl_cffi-0.5.10b2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/curl_cffi/include/curl/curlver.h)

### Resolution

Versions after 0.7 bundles with `libcurl>=8.5`, which is not affected by this issue.

## Which versions are affected by GHSA-3vpc-4p9p-47hc?

2 open source packages ship an affected version, including curl-cffi.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `curl-cffi` | PyPI | All versions | 0.7.0b6 |
| `curl-cffi` | PyPI | All versions | 0.7.0b6 |

## How do I fix GHSA-3vpc-4p9p-47hc?

Upgrade curl-cffi to 0.7.0b6 or later.

## Is GHSA-3vpc-4p9p-47hc being exploited?

There is no known exploitation of GHSA-3vpc-4p9p-47hc in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-3vpc-4p9p-47hc and fix it if it is affected.

What it is: GHSA-3vpc-4p9p-47hc is a vulnerability in curl-cffi, published on 22 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-3vpc-4p9p-47hc in the wild and no public exploit code.

Affected packages and fixed versions:
- curl-cffi (PyPI): affected all versions; fixed in 0.7.0b6
- curl-cffi (PyPI): affected all versions; fixed in 0.7.0b6

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-3vpc-4p9p-47hc/ (Markdown: https://insights.sbomify.com/GHSA-3vpc-4p9p-47hc/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-3vpc-4p9p-47hc

---
From sbomify Insights: https://insights.sbomify.com/GHSA-3vpc-4p9p-47hc/
Summaries are generated and may contain mistakes; the official description above is the record.
