Security Vulnerability Report
中文
CVE-2025-68616 CVSS 7.5 HIGH

CVE-2025-68616

Published: 2026-01-19 16:15:54
Last Modified: 2026-02-18 16:03:08

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.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:kozea:weasyprint:*:*:*:*:*:*:*:* - VULNERABLE
WeasyPrint < 68.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
构造包含重定向的HTML文档,利用WeasyPrint渲染时访问内部元数据端点。

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-68616", "sourceIdentifier": "[email protected]", "published": "2026-01-19T16:15:53.573", "lastModified": "2026-02-18T16:03:07.823", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}, {"lang": "es", "value": "WeasyPrint ayuda a los desarrolladores web a crear documentos PDF. Antes de la versión 68.0, existe una omisión de protección de falsificación de petición del lado del servidor (SSRF) en el `default_url_fetcher` de WeasyPrint. La vulnerabilidad permite a los atacantes acceder a recursos de red internos (como servicios de `localhost` o puntos finales de metadatos en la nube) incluso cuando un desarrollador ha implementado un `url_fetcher` personalizado para bloquear dicho acceso. Esto ocurre porque la librería `urllib` subyacente sigue las redirecciones HTTP automáticamente sin revalidar el nuevo destino contra la política de seguridad del desarrollador. La versión 68.0 contiene un parche para el problema."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-601"}, {"lang": "en", "value": "CWE-918"}]}, {"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-918"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:kozea:weasyprint:*:*:*:*:*:*:*:*", "versionEndExcluding": "68.0", "matchCriteriaId": "42F666F8-3ABE-4CAB-BAE5-99C8268DC002"}]}]}], "references": [{"url": "https://github.com/Kozea/WeasyPrint/commit/b6a14f0f3f4ce9c0c75c1a2d73cb1c5d43f0e565", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/Kozea/WeasyPrint/security/advisories/GHSA-983w-rhvv-gwmv", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://github.com/Kozea/WeasyPrint/security/advisories/GHSA-983w-rhvv-gwmv", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Third Party Advisory"]}]}}