# GHSA-jm77-qphf-c4w8: pyca/cryptography's wheels include vulnerable OpenSSL

> The pyca/cryptography library bundles vulnerable OpenSSL versions, exposing users to multiple security risks unless they upgrade to a patched release.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not stated
- **Attackable:** Not stated
- **Victim action needed:** Not stated
- **Fix available:** Yes
- **Published:** 1 Aug 2023

## What is GHSA-jm77-qphf-c4w8?

GHSA-jm77-qphf-c4w8 is a vulnerability in cryptography, published on 1 Aug 2023. 

### Official description

pyca/cryptography's wheels include a statically linked copy of OpenSSL. The versions of OpenSSL included in cryptography 0.8-41.0.2 are vulnerable to several security issues. More details about the vulnerabilities themselves can be found in https://www.openssl.org/news/secadv/20230731.txt, https://www.openssl.org/news/secadv/20230719.txt, and https://www.openssl.org/news/secadv/20230714.txt.

If you are building cryptography source ("sdist") then you are responsible for upgrading your copy of OpenSSL. Only users installing from wheels built by the cryptography project (i.e., those distributed on PyPI) need to update their cryptography versions.

## Which versions are affected by GHSA-jm77-qphf-c4w8?

2 open source packages ship an affected version, including cryptography.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cryptography` | PyPI | From 0.8 | 41.0.3 |
| `cryptography` | PyPI | From 0.8 | 41.0.3 |

## How do I fix GHSA-jm77-qphf-c4w8?

Upgrade cryptography to 41.0.3 or later.

## Is GHSA-jm77-qphf-c4w8 being exploited?

There is no known exploitation of GHSA-jm77-qphf-c4w8 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-jm77-qphf-c4w8 and fix it if it is affected.

What it is: GHSA-jm77-qphf-c4w8 is a vulnerability in cryptography, published on 1 Aug 2023. 
Exploitation: There is no known exploitation of GHSA-jm77-qphf-c4w8 in the wild and no public exploit code.

Affected packages and fixed versions:
- cryptography (PyPI): affected from 0.8; fixed in 41.0.3
- cryptography (PyPI): affected from 0.8; fixed in 41.0.3

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-jm77-qphf-c4w8/ (Markdown: https://insights.sbomify.com/GHSA-jm77-qphf-c4w8/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-jm77-qphf-c4w8

---
From sbomify Insights: https://insights.sbomify.com/GHSA-jm77-qphf-c4w8/
Summaries are generated and may contain mistakes; the official description above is the record.
