The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-68616

CVE-2025-68616: WeasyPrint SSRF Protection Bypass Flaw

CVE-2025-68616 is an SSRF protection bypass in WeasyPrint that allows attackers to access internal network resources despite custom security policies. This article covers technical details, affected versions, and mitigation.

Published: January 23, 2026

CVE-2025-68616 Overview

CVE-2025-68616 is a Server-Side Request Forgery (SSRF) protection bypass vulnerability in WeasyPrint, a popular Python library that helps web developers create PDF documents from HTML/CSS. Prior to version 68.0, an SSRF protection bypass exists in WeasyPrint's default_url_fetcher function. 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.

Critical Impact

Attackers can bypass SSRF protections to access sensitive internal network resources, cloud metadata endpoints (e.g., AWS EC2 metadata at 169.254.169.254), and localhost services, potentially leading to credential theft, data exfiltration, or further internal network compromise.

Affected Products

  • WeasyPrint versions prior to 68.0
  • Applications using default_url_fetcher with custom URL validation
  • Applications using allowed_protocols parameter of default_url_fetcher

Discovery Timeline

  • 2026-01-19 - CVE-2025-68616 published to NVD
  • 2026-01-20 - Last updated in NVD database

Technical Details for CVE-2025-68616

Vulnerability Analysis

This vulnerability is classified under CWE-601 (URL Redirection to Untrusted Site / Open Redirect). The flaw exists in the interaction between WeasyPrint's URL fetching mechanism and Python's urllib library. When developers implement security controls to validate URLs before fetching (such as blocking requests to internal IP ranges or localhost), the validation only occurs on the initial URL. However, urllib automatically follows HTTP redirects (301, 302, etc.) without invoking the developer's security checks on the redirect destination.

This means an attacker can provide an external URL that passes the initial security validation, but redirects to an internal resource. The attacker effectively uses the external server as a proxy to reach otherwise-protected internal endpoints. Common targets include cloud provider metadata services, internal APIs, and administrative interfaces bound to localhost.

Root Cause

The root cause is the automatic redirect-following behavior in Python's urllib library combined with insufficient re-validation of redirect destinations. When default_url_fetcher processes a URL, it validates the initial target but does not intercept or validate subsequent redirect URLs. The fix introduces a new URLFetcher class that properly handles redirects by applying the same security policy to all URLs in the redirect chain, and disables automatic redirects for the deprecated default_url_fetcher function.

Attack Vector

The attack is network-based and requires no authentication or user interaction. An attacker can exploit this vulnerability by:

  1. Setting up a malicious external server that responds with an HTTP redirect (302) to an internal target URL
  2. Submitting HTML/CSS content to a vulnerable WeasyPrint instance that references the attacker's external URL
  3. The external URL passes the developer's URL validation since it points to an allowed external domain
  4. When fetched, the external server redirects to http://169.254.169.254/latest/meta-data/ or http://localhost:8080/admin
  5. urllib automatically follows the redirect, bypassing security controls
python
    warnings.warn(
        "default_url_fetcher is deprecated and will be removed in WeasyPrint 69.0, "
        "please use URLFetcher instead. For security reasons, HTTP redirects are not "
        "supported anymore with default_url_fetcher, but are with URLFetcher.\n\nSee "
        "https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#url-fetchers",
        category=DeprecationWarning)
    fetcher = URLFetcher(
        timeout, ssl_context, http_headers, allowed_protocols, allow_redirects=False)
    return fetcher.fetch(url)

Source: GitHub Commit Changes

Detection Methods for CVE-2025-68616

Indicators of Compromise

  • Outbound HTTP requests from WeasyPrint application servers to unusual external domains followed by internal network connections
  • Access logs showing requests to cloud metadata endpoints (e.g., 169.254.169.254) originating from PDF generation services
  • Unexpected HTTP redirects in network traffic from PDF rendering workflows
  • Error logs indicating failed connections to internal services from the WeasyPrint application context

Detection Strategies

  • Monitor network traffic for HTTP redirect chains that originate externally but terminate at internal IP addresses or localhost
  • Implement network-level detection for connections to cloud metadata IP ranges (169.254.169.254) from application servers
  • Review WeasyPrint application logs for URL fetching patterns that include external URLs followed by internal resource access
  • Deploy web application firewall rules to detect SSRF redirect patterns in PDF generation requests

Monitoring Recommendations

  • Enable detailed logging for all URL fetch operations in WeasyPrint-based applications
  • Configure network monitoring to alert on any outbound connections to link-local addresses from application servers
  • Implement egress filtering and logging to detect unexpected internal network access patterns
  • Monitor for deprecation warnings in application logs indicating use of vulnerable default_url_fetcher function

How to Mitigate CVE-2025-68616

Immediate Actions Required

  • Upgrade WeasyPrint to version 68.0 or later immediately
  • Migrate from deprecated default_url_fetcher function to the new URLFetcher class
  • Review all custom URL fetcher implementations to ensure redirect validation is in place
  • Audit existing PDF generation workflows for potential SSRF exposure

Patch Information

The vulnerability is patched in WeasyPrint version 68.0, released on 2026-01-19. The fix introduces a new URLFetcher class that properly validates all URLs in redirect chains against the configured security policy. The legacy default_url_fetcher function is deprecated and now disables HTTP redirects by default to prevent exploitation. Users should migrate to the URLFetcher class for secure redirect handling. Technical details are available in the GitHub Security Advisory GHSA-983w and the security patch commit.

Workarounds

  • If immediate upgrade is not possible, implement network-level controls to block outbound connections to internal IP ranges and cloud metadata endpoints
  • Add a reverse proxy or firewall rule that strips or blocks HTTP redirect responses to internal addresses
  • Disable external URL fetching entirely in WeasyPrint if not required for business functionality
  • Implement custom URL validation that resolves DNS and validates the final IP address before allowing connections
bash
# Configuration example
# Upgrade WeasyPrint to patched version
pip install --upgrade weasyprint>=68.0

# Verify installed version
pip show weasyprint | grep Version

# For network-level mitigation, block metadata endpoint access (iptables example)
iptables -A OUTPUT -d 169.254.169.254 -j DROP

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeSSRF

  • Vendor/TechWeasyprint

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-601
  • Technical References
  • GitHub Commit Changes

  • GitHub Security Advisory GHSA-983w
  • Latest CVEs
  • CVE-2025-9962: Novakon P Series Privilege Escalation

  • CVE-2026-1961: Foreman WebSocket Proxy RCE Vulnerability

  • CVE-2026-4903: Tenda AC5 Buffer Overflow Vulnerability

  • CVE-2026-4902: Tenda AC5 Buffer Overflow Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English