# CVE-2025-68616: WeasyPrint Vulnerable to Server-Side Request Forgery (SSRF) Protection Bypass via HTTP Redirect

> Attackers can bypass SSRF protections in WeasyPrint to access internal network resources via HTTP redirects, exposing sensitive data.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 Jan 2026
- **Updated:** 15 Jul 2026
- **Also known as:** DEBIAN-CVE-2025-68616, GHSA-983w-rhvv-gwmv, PYSEC-2026-2034, UBUNTU-CVE-2025-68616, openSUSE-SU-2026:10079-1, openSUSE-SU-2026:20069-1

## What is CVE-2025-68616?

CVE-2025-68616 is a high-severity server-side request forgery vulnerability in Kozea WeasyPrint, published on 19 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

WeasyPrint helps web developers to create PDF documents. Prior to version 68.0, a server-side request forgery (SSRF) protection bypass exists in WeasyPrint's `default_url_fetcher`. The vulnerability allows attackers to access internal network resources (such as `localhost` services or cloud metadata endpoints) even when a developer has implemented a custom `url_fetcher` to block such access. This occurs because the underlying `urllib` library follows HTTP redirects automatically without re-validating the new destination against the developer's security policy. Version 68.0 contains a patch for the issue.

Weakness: CWE-918 (Server-Side Request Forgery), CWE-601 (URL Redirection to Untrusted Site)

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

3 open source packages ship an affected version, including weasyprint. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `weasyprint` | PyPI | All versions | 68.0 |
| `weasyprint` | PyPI | All versions | 68.0 |
| `weasyprint` | PyPI | All versions | 68.0 |
| `python-weasyprint` | openSUSE:Leap 16.0 | All versions | 65.1-bp160.2.1 |
| `python-weasyprint` | openSUSE:Tumbleweed | All versions | 68.0-1.1 |

Products: Kozea Weasyprint.

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

Upgrade weasyprint to 68.0 or later.

## Is CVE-2025-68616 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-68616 exists.

Public exploit code:

- Hands-on vulnerability management case study: how Wazuh flagged a real SSRF (CVE-2025-68616) in WeasyPrint, and how I reproduced and patched it. (github_poc): https://github.com/rauljvc8/CVE-2025-68616-Detecting-and-Patching-an-SSRF-in-WeasyPrint-with-Wazuh

## Fix prompt for AI coding agents

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

What it is: CVE-2025-68616 is a high-severity server-side request forgery vulnerability in Kozea WeasyPrint, published on 19 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-68616 exists.

Affected packages and fixed versions:
- weasyprint (PyPI): affected all versions; fixed in 68.0
- weasyprint (PyPI): affected all versions; fixed in 68.0
- weasyprint (PyPI): affected all versions; fixed in 68.0

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

## Sources

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

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