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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2026-4786

CVE-2026-4786: Python webbrowser RCE Vulnerability

CVE-2026-4786 is a remote code execution flaw in Python's webbrowser module allowing shell command injection via %action URL bypass. This post explains its impact, affected versions, and mitigation steps.

Published: April 17, 2026

CVE-2026-4786 Overview

CVE-2026-4786 is a command injection vulnerability in Python's webbrowser module that represents an incomplete mitigation of CVE-2026-4519. When a URL contains %action, the original security mitigation can be bypassed for certain browser types, allowing attackers to inject commands into the underlying shell through the webbrowser.open() API. This bypass vulnerability demonstrates the challenges of properly sanitizing user-controlled input in security-sensitive contexts.

Critical Impact

Successful exploitation allows attackers to execute arbitrary shell commands on the target system through maliciously crafted URLs, bypassing the security controls implemented for CVE-2026-4519.

Affected Products

  • Python CPython (multiple versions)
  • Applications using the webbrowser.open() API with user-controlled URLs
  • Systems with vulnerable browser configurations

Discovery Timeline

  • 2026-04-13 - CVE CVE-2026-4786 published to NVD
  • 2026-04-14 - Last updated in NVD database

Technical Details for CVE-2026-4786

Vulnerability Analysis

This command injection vulnerability (CWE-77) stems from an incomplete fix for the original CVE-2026-4519 issue in Python's webbrowser module. The vulnerability requires local access and user interaction to exploit, where an attacker must convince a user to open a specially crafted URL. When successful, the attacker can achieve high confidentiality and integrity impact on the vulnerable system.

The core issue lies in how the webbrowser module handles URL substitution with %action patterns. The original mitigation implemented a _check_url() function to validate URLs before processing, but this check could be bypassed when the URL contained specific %action substitution sequences that were processed after the validation occurred.

Root Cause

The root cause is an improper input validation sequence in the webbrowser.open() function. The _check_url() validation was performed before the %action substitution occurred, allowing attackers to craft URLs that pass the initial check but result in malicious command strings after substitution processing. This is a classic case of validation bypass through transformation ordering issues.

Attack Vector

The attack vector is local, requiring the attacker to have some form of access to influence the URL parameter passed to webbrowser.open(). The attack requires user interaction (UI:A) and specific preconditions to be met (AT:P), including the use of certain browser types that are susceptible to shell command injection. An attacker would craft a URL containing %action sequences that, after substitution, result in shell metacharacters or commands being injected into the browser execution command line.

python
# Security patch in Lib/webbrowser.py
# The fix repositions URL validation to occur after %action substitution
 
    def open(self, url, new=0, autoraise=True):
        sys.audit("webbrowser.open", url)
-        self._check_url(url)
        if new == 0:
            action = self.remote_action
        elif new == 1:

Source: GitHub Commit c5767a7

Detection Methods for CVE-2026-4786

Indicators of Compromise

  • Monitor for URLs containing %action patterns being passed to Python applications using the webbrowser module
  • Look for unusual shell command execution following browser launch operations
  • Check for unexpected child processes spawned from Python applications that use browser automation
  • Audit application logs for malformed URL patterns with shell metacharacters

Detection Strategies

  • Implement application-level logging for all webbrowser.open() calls with full URL parameter capture
  • Deploy endpoint detection rules to flag Python processes spawning unexpected shell commands
  • Monitor system audit logs for webbrowser.open audit events using Python's sys.audit() framework
  • Create SIEM rules to correlate browser launch events with suspicious command execution patterns

Monitoring Recommendations

  • Enable Python audit hooks to capture all webbrowser.open events in security-sensitive environments
  • Implement URL allowlisting for applications that programmatically open browser windows
  • Deploy SentinelOne behavioral AI to detect anomalous process chains originating from Python interpreters
  • Monitor for exploitation attempts by tracking URLs with %action substitution patterns in web application firewalls

How to Mitigate CVE-2026-4786

Immediate Actions Required

  • Update Python to the latest patched version that addresses this bypass vulnerability
  • Review all application code that uses webbrowser.open() with user-controlled input
  • Implement additional input validation before passing URLs to the webbrowser module
  • Consider disabling or restricting browser automation features in security-sensitive deployments

Patch Information

The Python development team has released patches across multiple branches to address this vulnerability. The fix involves repositioning the URL validation check to occur at the correct point in the processing sequence, ensuring that %action substitution cannot bypass security controls.

Relevant patches are available through the following commits:

  • Commit c5767a7 for Python 3.10
  • Commit d22922c for the main branch
  • Commit f465482 for Python 3.11

For additional details, see the Python Security Announcement and GitHub Issue #148169.

Workarounds

  • Sanitize all URLs before passing them to webbrowser.open(), specifically filtering %action and other potentially dangerous patterns
  • Implement a strict URL allowlist that only permits known-safe URL schemes and domains
  • Use alternative browser launching mechanisms that don't rely on shell command execution
  • Deploy application sandboxing to limit the impact of potential command injection
bash
# Configuration example - Input validation before webbrowser.open()
# Add this validation to your Python application code:

# Validate URLs before passing to webbrowser module
# Reject URLs containing %action or shell metacharacters
# Example: if re.search(r'%action|[;&|`$]', url): raise ValueError("Invalid URL")

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechN/A

  • SeverityHIGH

  • CVSS Score7.0

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityNone
  • CWE References
  • CWE-77
  • Technical References
  • GitHub Commit 1 Update

  • GitHub Commit 2 Update

  • GitHub Commit 3 Update

  • GitHub Issue #148169

  • GitHub Pull Request #148170

  • Python Security Announcement
  • Latest CVEs
  • CVE-2025-52479: HTTP.jl & URIs.jl CRLF Injection Flaw

  • CVE-2026-31740: Linux Kernel Race Condition Vulnerability

  • CVE-2026-31743: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-31744: Linux Kernel NULL Pointer Vulnerability
Default Legacy - Prefooter | 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