# CVE-2025-45768: Weak cryptography in n/a

> The pyjwt library allows weak encryption due to application-chosen key lengths, potentially enabling cryptographic bypasses.

- **Severity:** High 7.0 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 31 Jul 2025
- **Updated:** 14 Aug 2025
- **Also known as:** CLSA-2025-1756858339, CLSA-2025-1757376737, DEBIAN-CVE-2025-45768, ECHO-3137-3dc7-eda3, GHSA-xpf8-484v-j9w6, MINI-57jg-w3p9-g2cw, PYSEC-2025-183

## What is CVE-2025-45768?

CVE-2025-45768 is a high-severity vulnerability in n/a, published on 31 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

pyjwt v2.10.1 was discovered to contain weak encryption. NOTE: this is disputed by the Supplier because the key length is chosen by the application that uses the library (admittedly, library users may benefit from a minimum value and a mechanism for opting in to strict enforcement).

Weakness: CWE-311 (Missing Encryption of Sensitive Data)

## Which versions are affected by CVE-2025-45768?

1 open source package ship an affected version, including pyjwt. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pyjwt` | PyPI | All versions to 2.10.1 | None |

Products: Pyjwt Project Pyjwt.

## How do I fix CVE-2025-45768?

No fix published yet.

## Is CVE-2025-45768 being exploited?

There is no known exploitation of CVE-2025-45768 in the wild and no public exploit code.

## Other vulnerabilities in n/a

- [CVE-2026-102268](https://insights.sbomify.com/CVE-2026-102268/): PyJWT: Asymmetric-PEM detection bypass: whitespace/line-ending-mutated public keys skip the HS/asymmetric confusion guard (critical 9.1)
- [CVE-2026-32597](https://insights.sbomify.com/CVE-2026-32597/): PyJWT accepts unknown `crit` header extensions (RFC 7515 §4.1.11 MUST violation) (high 7.5)
- [CVE-2026-102266](https://insights.sbomify.com/CVE-2026-102266/): PyJWK accepts empty HMAC keys, bypassing PyJWT's empty-key validation (high 7.4)
- [CVE-2026-102267](https://insights.sbomify.com/CVE-2026-102267/): PyJWT: PyJWKClient follows redirects when fetching JWKS (high 7.4)
- [CVE-2026-102271](https://insights.sbomify.com/CVE-2026-102271/): PyJWT: Public keys in DER form are accepted as HMAC secrets, bypassing the CVE-2022-29217 guard (high 7.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-45768 and fix it if it is affected.

What it is: CVE-2025-45768 is a high-severity vulnerability in n/a, published on 31 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-45768 in the wild and no public exploit code.

Affected packages and fixed versions:
- pyjwt (PyPI): affected all versions up to 2.10.1; no fix listed

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/CVE-2025-45768/ (Markdown: https://insights.sbomify.com/CVE-2025-45768/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-45768
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-45768
- OSV: https://osv.dev/vulnerability/CVE-2025-45768

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-45768/
Summaries are generated and may contain mistakes; the official description above is the record.
